* repair time by slowing it down

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42580 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexander von Gluck IV
2011-08-05 05:47:31 +00:00
parent e7f4040697
commit 88932cfb41
@@ -507,16 +507,15 @@ atom_op_compare(atom_exec_context *ctx, int *ptr, int arg)
static void static void
atom_op_delay(atom_exec_context *ctx, int *ptr, int arg) atom_op_delay(atom_exec_context *ctx, int *ptr, int arg)
{ {
uint8 count = U8((*ptr)++); bigtime_t count = U8((*ptr)++);
if (arg == ATOM_UNIT_MICROSEC) { if (arg == ATOM_UNIT_MICROSEC) {
TRACE("%s: %" B_PRIu8 " microseconds\n", __func__, count); TRACE("%s: %" B_PRId64 " microseconds\n", __func__, count);
// Microseconds // Microseconds
usleep(count); snooze(count);
} else { } else {
TRACE("%s: %" B_PRIu8 " milliseconds\n", __func__, count); TRACE("%s: %" B_PRId64 " milliseconds\n", __func__, count);
// TODO : check
// Milliseconds // Milliseconds
usleep(count); snooze(count * 1000);
} }
} }