Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PRINT:
- 1289256532 1289256532
- 942718376 925791142
- bereknd:0 0
- er is nog wel tijd over, dus opnieuw beginnen
- 1289256537 1289256537
- 970162686 965984616
- bereknd:0 0
- er is nog wel tijd over, dus opnieuw beginnen
- CODE:
- std::cout << now.tv_sec << " " << start.tv_sec << std::endl;
- std::cout << now.tv_nsec << " " << start.tv_nsec << std::endl;
- if ( ( end.tv_nsec - now.tv_nsec ) < 0 ) {
- timeout.tv_sec = end.tv_sec - now.tv_sec - 1;
- timeout.tv_nsec = 1000000000 + end.tv_nsec - now.tv_nsec;
- }
- else {
- timeout.tv_sec = end.tv_sec - now.tv_sec;
- timeout.tv_nsec = end.tv_nsec - now.tv_nsec;
- }
- std::cout << "bereknd:" << timeout.tv_sec << " " << timeout.tv_sec << std::endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement