##// END OF EJS Templates
py2: remove simple from __future__ statements...
py2: remove simple from __future__ statements These were needed for Python 2 support. Now that our linter no longer mandates these, we can start deleting them. Differential Revision: https://phab.mercurial-scm.org/D12254

File last commit:

r49730:6000f5b2 default
r49730:6000f5b2 default
Show More
mocktime.py
18 lines | 408 B | text/x-python | PythonLexer
import os
import time
class mocktime(object):
def __init__(self, increment):
self.time = 0
self.increment = [float(s) for s in increment.split()]
self.pos = 0
def __call__(self):
self.time += self.increment[self.pos % len(self.increment)]
self.pos += 1
return self.time
def uisetup(ui):
time.time = mocktime(os.environ.get('MOCKTIME', '0.1'))