|
System | : | Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686 |
Software | : | Apache. PHP/5.3.6-13ubuntu3.10 |
ID | : | uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
|
|
Safe Mode | : | OFF |
Open_Basedir | : | OFF |
Freespace | : | 23.09 GB of 70.42 GB (32.79%) |
|
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON |
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
|
[ System Info ]
[ Processes ]
[ SQL Manager ]
[ Eval ]
[ Encoder ]
[ Mailer ]
[ Back Connection ]
[ Backdoor Server ]
[ Kernel Exploit Search ]
[ MD5 Decrypter ]
[ Reverse IP ]
[ Kill Shell ]
[ FTP Brute-Force ]
|
|
/
usr/
lib/
python2.7/
dist-packages/
twisted/
test/
- drwxr-xr-x
|
Viewing file: time_helpers.py (1.95 KB) -rw-r--r--Select action/file-type:  ( +) |  ( +) |  ( +) | Code ( +) | Session ( +) |  ( +) | SDB ( +) |  ( +) |  ( +) |  ( +) |  ( +) |  ( +) |
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details.
""" Helper class to writing deterministic time-based unit tests.
Do not use this module. It is a lie. See L{twisted.internet.task.Clock} instead. """
import warnings warnings.warn( "twisted.test.time_helpers is deprecated since Twisted 10.0. " "See twisted.internet.task.Clock instead.", category=DeprecationWarning, stacklevel=2)
class Clock(object): """ A utility for monkey-patches various parts of Twisted to use a simulated timing mechanism. DO NOT use this class. Use L{twisted.internet.task.Clock}. """ rightNow = 0.0
def __call__(self): """ Return the current simulated time. """ return self.rightNow
def install(self): """ Monkeypatch L{twisted.internet.reactor.seconds} to use L{__call__} as a time source """ # Violation is fun. from twisted.internet import reactor self.reactor_original = reactor.seconds reactor.seconds = self
def uninstall(self): """ Remove the monkeypatching of L{twisted.internet.reactor.seconds}. """ from twisted.internet import reactor reactor.seconds = self.reactor_original
def adjust(self, amount): """ Adjust the current simulated time upward by the given C{amount}.
Note that this does not cause any scheduled calls to be run. """ self.rightNow += amount
def pump(self, reactor, timings): """ Iterate the given C{reactor} with increments of time specified by C{timings}.
For each timing, the simulated time will be L{adjust}ed and the reactor will be iterated twice. """ timings = list(timings) timings.reverse() self.adjust(timings.pop()) while timings: self.adjust(timings.pop()) reactor.iterate() reactor.iterate()
|