Guest User

Untitled

a guest
Jun 23rd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. NTSTATUS hStatus;
  2. SYSTEM_PERFORMANCE_INFORMATION stSysPerfInfo;
  3.  
  4. hStatus = NtQuerySystemInformation(SystemPerformanceInformation, &stSysPerfInfo, sizeof(stSysPerfInfo), NULL);
  5. if (hStatus != NO_ERROR)
  6. {
  7. // Do work....
  8. }
  9.  
  10. void f()
  11. {
  12. std::clock_t init = std::clock();
  13. // perform some operations
  14. std::clock_t end = std::clock();
  15. std::cout << end-init << " cpu ticks spent, or about "
  16. << (end-init)/CLOCKS_PER_SEC << " seconds." << std::endl;
  17. }
Add Comment
Please, Sign In to add comment