Python: import time
Discussion in 'Rust Development' started by TheRotAG, Jan 30, 2015.
-
do you mean the python module or the oxide library? you can use something like this:
Code:import System from System import Action, Int32, Stringclass Test: def __init__(self): self.Title = "Test Plugin" self.Author = "Nogrod" self.Version = V(1, 0, 0) self.HasConfig = True def OnServerInitialized(self): def my_callback_func(): print "Timer: " + self.Title def response_handler(code, response): print response timer.Once(1.0, Action(my_callback_func), self.Plugin ) timer.Once(1.0, Action(self.other_callback), self.Plugin ) webrequests.EnqueueGet("http://loripsum.net/generate.php?p=1&l=short", Action[Int32,String](response_handler), self.Plugin); print "server init: " + time.GetCurrentTime().ToString() def other_callback(self): print "Other Timer: " + self.Title -
The Python module

but it seems like i need to stick to the oxide library.
