webForumDet fria alternativet

sleep?

5 svar · 417 visningar · startad av trasher

trasherMedlem sedan mars 200143 inlägg
#1

Kan jag använda sleep(); i c++?
Isåfall vilken header ligger den i?

------------------
- Trasher a.k.a Kristian

fnolisMedlem sedan sep. 200162 inlägg
#2

SLEEP(3) Linux Programmer's Manual SLEEP(3)

NAME
sleep - Sleep for the specified number of seconds

SYNOPSIS
#include <unistd.h>

   unsigned int sleep(unsigned int seconds);

DESCRIPTION
sleep() makes the current process sleep until seconds seconds have elapsed or a signal arrives which is not
ignored.

RETURN VALUE
Zero if the requested time has elapsed, or the number of seconds left to sleep.

trasherMedlem sedan mars 200143 inlägg
#3

Man tackar...

------------------
- Trasher a.k.a Kristian

SweyMedlem sedan apr. 20003 971 inlägg
#4

Använder du Linux? Det ser inte ut som det.

I Windows finns det en funktion som heter Sleep (stor bokstav). Slå upp den i din manual.

------------------
- Swey
A hacker from the south

fnolisMedlem sedan sep. 200162 inlägg
#5

Är inte Sleep() med stor bokstav i windows millisekunder?

SweyMedlem sedan apr. 20003 971 inlägg
#6

Ja, visst.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/prothred_7jxs.asp

------------------
- Swey
A hacker from the south

137 ms totalt · 3 externa anrop · v20260731065814-full.30151723
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
135 ms — hämta tråd, inlägg och bilagor (db)