From c113ec724288696f4202924df966628a5988c29f Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Sun, 8 Feb 2009 22:47:39 +0000 Subject: Add a Sleep() function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64101 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/System/Unix/Alarm.inc | 4 ++++ lib/System/Win32/Alarm.inc | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'lib') diff --git a/lib/System/Unix/Alarm.inc b/lib/System/Unix/Alarm.inc index 7faa6af..28ff1b8 100644 --- a/lib/System/Unix/Alarm.inc +++ b/lib/System/Unix/Alarm.inc @@ -66,3 +66,7 @@ int sys::AlarmStatus() { return 1; return 0; } + +void Sleep(unsigned n) { + ::sleep(n); +} diff --git a/lib/System/Win32/Alarm.inc b/lib/System/Win32/Alarm.inc index 2f1a280..64a2107 100644 --- a/lib/System/Win32/Alarm.inc +++ b/lib/System/Win32/Alarm.inc @@ -34,3 +34,7 @@ int sys::AlarmStatus() { // FIXME: Implement for Win32 return 0; } + +void Sleep(unsigned n) { + Sleep(n*1000); +} -- cgit v1.1