Maciej Fijalkowski committed dcefcdf

add docstrings

Comments (0)

Files changed (1)


 @unwrap_spec(which=int, first=float, interval=float)
 def setitimer(space, which, first, interval=0):
+    """setitimer(which, seconds[, interval])
+    Sets given itimer (one of ITIMER_REAL, ITIMER_VIRTUAL
+    or ITIMER_PROF) to fire after value seconds and after
+    that every interval seconds.
+    The itimer can be cleared by setting seconds to zero.
+    Returns old values as a tuple: (delay, interval).
+    """
     with lltype.scoped_alloc(itimervalP.TO, 1) as new:
         timeval_from_double(first, new[0].c_it_value)
 def getitimer(space, which):
+    """getitimer(which)
+    Returns current value of given itimer.
+    """
     with lltype.scoped_alloc(itimervalP.TO, 1) as old:
         c_getitimer(which, old)