[pypy-commit] lang-smalltalk default: added IDLE_FOR_MICROSECONDS primitive, prolonging the idle-waiting minimaly
lwassermann
noreply at buildbot.pypy.org
Mon Apr 22 14:07:36 CEST 2013
Author: Lars Wassermann <lars.wassermann at gmail.com>
Branch:
Changeset: r312:388713badc5f
Date: 2013-04-22 14:05 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/388713badc5f/
Log: added IDLE_FOR_MICROSECONDS primitive, prolonging the idle-waiting
minimaly fixed the signature of GET_NEXT_EVENT
diff --git a/spyvm/primitives.py b/spyvm/primitives.py
--- a/spyvm/primitives.py
+++ b/spyvm/primitives.py
@@ -554,8 +554,8 @@
w_point.store(interp.space, 1, interp.space.wrap_int(y))
return w_point
- at expose_primitive(GET_NEXT_EVENT, unwrap_spec=[object])
-def func(interp, s_frame, w_rcvr):
+ at expose_primitive(GET_NEXT_EVENT, unwrap_spec=[object, object])
+def func(interp, s_frame, w_rcvr, w_into):
raise PrimitiveNotYetWrittenError()
@expose_primitive(BITBLT_COPY_BITS, unwrap_spec=[object], clean_stack=False)
@@ -1302,8 +1302,16 @@
# ___________________________________________________________________________
# Drawing
+IDLE_FOR_MICROSECONDS = 230
FORCE_DISPLAY_UPDATE = 231
+ at expose_primitive(IDLE_FOR_MICROSECONDS, unwrap_spec=[object, int])
+def func(interp, s_frame, w_rcvr, time_mu_s):
+ import time
+ time_s = time_mu_s / 1000000.0
+ time.sleep(time_s)
+ return w_rcvr
+
@expose_primitive(FORCE_DISPLAY_UPDATE, unwrap_spec=[object])
def func(interp, s_frame, w_rcvr):
w_prev_display = interp.space.objtable['w_display']
More information about the pypy-commit
mailing list