mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 03:29:40 +00:00
Add a Sleep() function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64101 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e220e8cc07
commit
ba041f45fe
@ -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