timeGetTime

Hi all! Can you tell me please ? How can I get system time in Linux ? Is there any function like timeGetTime in Windows ?

Best regards
holtaf
Will the standard C time functions work for you?

http://www.cplusplus.com/reference/clibrary/ctime/
You can get you system time using the standard library. Foe example:

1
2
3
4
5
6
7
8
9
10
11
int main(){
	time_t rawtime;
	tm* TimeNow;
	
	time(&rawtime);
	TimeNow = localtime(&rawtime);
	
	std::cout <<"Now: "<< TimeNow->tm_hour<<":"<<TimeNow->tm_min<<endl;
	
	return 0;
}
Topic archived. No new replies allowed.