Staging
v0.5.1
v0.5.1
https://github.com/python/cpython
Revision 56f1682a4462559b735c01c6cb8c06fd1afdc11b authored by Ezio Melotti on 01 March 2010, 04:05:56 UTC, committed by Ezio Melotti on 01 March 2010, 04:05:56 UTC
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78515 | georg.brandl | 2010-02-28 20:19:17 +0200 (Sun, 28 Feb 2010) | 1 line #8030: make builtin type docstrings more consistent: use "iterable" instead of "seq(uence)", use "new" to show that set() always returns a new object. ........ r78516 | georg.brandl | 2010-02-28 20:26:37 +0200 (Sun, 28 Feb 2010) | 1 line The set types can also be called without arguments. ........ r78522 | ezio.melotti | 2010-03-01 01:59:00 +0200 (Mon, 01 Mar 2010) | 1 line #8030: more docstring fix for builtin types. ........
1 parent c5e6279
Tip revision: 56f1682a4462559b735c01c6cb8c06fd1afdc11b authored by Ezio Melotti on 01 March 2010, 04:05:56 UTC
Merged revisions 78515-78516,78522 via svnmerge from
Merged revisions 78515-78516,78522 via svnmerge from
Tip revision: 56f1682
sleep.c
#include "oslib/osmodule.h"
#include <stdio.h>
#include "kernel.h"
#include <limits.h>
#include <errno.h>
#include "oslib/taskwindow.h"
#include "Python.h"
int riscos_sleep(double delay)
{
os_t starttime, endtime, time; /* monotonic times (centiseconds) */
int *pollword, ret;
osbool claimed;
/* calculate end time */
starttime = os_read_monotonic_time();
if (starttime + 100.0*delay >INT_MAX)
endtime = INT_MAX;
else
endtime = (os_t)(starttime + 100.0*delay);
/* allocate (in RMA) and set pollword for xupcall_sleep */
pollword = osmodule_alloc(4);
*pollword = 1;
time = starttime;
ret = 0;
while ( time<endtime && time>=starttime ) {
xupcall_sleep (pollword, &claimed);
if (PyErr_CheckSignals()) {
ret = 1;
break;
}
time = os_read_monotonic_time();
}
/* deallocate pollword */
osmodule_free(pollword);
return ret;
}
Computing file changes ...