mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-22 19:49:49 +00:00
Add a Sleep() function.
llvm-svn: 64101
This commit is contained in:
parent
c3f02abe2b
commit
d9f64e601f
@ -39,6 +39,11 @@ namespace sys {
|
||||
/// @returns -1=cancelled, 0=untriggered, 1=triggered
|
||||
int AlarmStatus();
|
||||
|
||||
/// Sleep for n seconds.
|
||||
/// @returns nothing.
|
||||
void Sleep(unsigned n);
|
||||
|
||||
|
||||
} // End sys namespace
|
||||
} // End llvm namespace
|
||||
|
||||
|
@ -66,3 +66,7 @@ int sys::AlarmStatus() {
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Sleep(unsigned n) {
|
||||
::sleep(n);
|
||||
}
|
||||
|
@ -34,3 +34,7 @@ int sys::AlarmStatus() {
|
||||
// FIXME: Implement for Win32
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Sleep(unsigned n) {
|
||||
Sleep(n*1000);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user