diff options
| author | Antoine Pitrou <solipsis@pitrou.net> | 2010-05-09 14:46:46 (GMT) |
|---|---|---|
| committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-05-09 14:46:46 (GMT) |
| commit | c83ea137d7e717f764e2f31fc2544f522de7d857 (patch) | |
| tree | ccfdacfdcdc4ed68e56324a07b6f25ab5327bdcd /RISCOS/sleep.c | |
| parent | 368ede83d9c96004dc5c489511936a588537f410 (diff) | |
| download | cpython-c83ea137d7e717f764e2f31fc2544f522de7d857.zip cpython-c83ea137d7e717f764e2f31fc2544f522de7d857.tar.gz cpython-c83ea137d7e717f764e2f31fc2544f522de7d857.tar.bz2 | |
Untabify C files. Will watch buildbots.
Diffstat (limited to 'RISCOS/sleep.c')
| -rw-r--r-- | RISCOS/sleep.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/RISCOS/sleep.c b/RISCOS/sleep.c index c85eb86..ffdff81 100644 --- a/RISCOS/sleep.c +++ b/RISCOS/sleep.c @@ -9,33 +9,33 @@ int riscos_sleep(double delay) { - os_t starttime, endtime, time; /* monotonic times (centiseconds) */ - int *pollword, ret; - osbool claimed; + 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); + /* 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; + /* 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(); - } + 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; + /* deallocate pollword */ + osmodule_free(pollword); + return ret; } |
