Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <windows.h>
- #include <wchar.h>
- #include <unistd.h>
- #define sleep(x) Sleep(1000 * x)
- int main ( void ) //getting local date and time function -17:05:18 11.12.2012-
- {
- SYSTEMTIME localTime, localDate;
- GetLocalTime ( &localTime );
- wprintf ( L"\rThe local time is: %02d:%02d:%02d %02d.%02d.%d", localTime.wHour, localTime.wMinute, localTime.wSecond, localTime.wDay, localTime.wMonth, localTime.wYear );
- sleep(1);
- main(); // call main function for unlimited time, but with 1 second delay time
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement