Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 424e4da

Browse files
committed
Rot out all uses of time.milli*().
1 parent 0efafb3 commit 424e4da

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

Demo/sgi/video/Dsend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def main():
156156

157157
rv = lvi.getnextpacket()
158158
if not rv:
159-
time.millisleep(10)
159+
time.sleep(0.010)
160160
continue
161161

162162
pos, data = rv

Demo/sgi/video/VFile.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,6 @@ def __init__(self):
385385
self.color0 = None # magic, used by clearto()
386386
self.fixcolor0 = 0 # don't need to fix color0
387387
self.mustunpack = (not support_packed_pixels())
388-
return self
389388

390389
# setinfo() must reset some internal flags
391390

@@ -1184,11 +1183,11 @@ def test():
11841183
gl.prefsize(vin.getsize())
11851184
wid = gl.winopen(filename)
11861185
vin.initcolormap()
1187-
t0 = time.millitimer()
1186+
t0 = time.time()
11881187
while 1:
11891188
try: t, data, cdata = vin.getnextframe()
11901189
except EOFError: break
1191-
dt = t0 + t - time.millitimer()
1192-
if dt > 0: time.millisleep(dt)
1190+
dt = t0 + t - time.time()
1191+
if dt > 0: time.time(dt)
11931192
vin.showframe(data, cdata)
11941193
time.sleep(2)

Demo/sgi/video/Vsend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def main():
128128

129129
rv = lvi.getnextpacket()
130130
if not rv:
131-
time.millisleep(10)
131+
time.sleep(0.010)
132132
continue
133133

134134
pos, data = rv

0 commit comments

Comments
 (0)