1. cbjadwani
  2. pypy

Commits

Maciej Fijalkowski  committed dcefcdf Draft

add docstrings

  • Participants
  • Parent commits 87b7ebf
  • Branches default

Comments (0)

Files changed (1)

File pypy/module/signal/interp_signal.py

View file
  • Ignore whitespace
 @jit.dont_look_inside
 @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)
 @jit.dont_look_inside
 @unwrap_spec(which=int)
 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)