i want to know how to counting down the time ?
and how to get current time?
and also if there is a statement ,how can i print out each character of this statement in a second in console app?
any help would be appreciated.
Printable View
i want to know how to counting down the time ?
and how to get current time?
and also if there is a statement ,how can i print out each character of this statement in a second in console app?
any help would be appreciated.
To get current time: GetSystemTime
To count time: get two structures at two different times with the api above and difference-them
thanks for answer.
and which header should i include because in <ctime> it doesn't exist(or how to use them)?
it seem's it's not clear about what i said
""""and also if there is a statement ,how can i print out each character of this statement in a second in console app?""""
i want to know how can i use "sleep" in c++?
Really can't understand your question.. do you want to print out the time difference quickly ('in a second') or in seconds difference format (like 4943 seconds between the two events) ?
And I don't also get what does it have to do with "sleep" function
i agree that is a dumb question
for example if the statment is "hello"
when program execute it print "h"(after 1 second print)"e"(and again after one second print )"l"
and so on ... till the statement finished and to my knowledge it can happen with sleep function but i don't know how i can use "sleep" function
and also the GetSystemTime didnot worked(i.e if there is a header file should i include it?)
i don't get "with the ""api"" above and difference-them ".
thanks for help.
Go to Google, put 'GetSystemTime function' to request, do the search, follow the link to MSDN, go to the article's bottom and see what header and lib file to include.Quote:
and which header should i include