Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NTSTATUS hStatus;
- SYSTEM_PERFORMANCE_INFORMATION stSysPerfInfo;
- hStatus = NtQuerySystemInformation(SystemPerformanceInformation, &stSysPerfInfo, sizeof(stSysPerfInfo), NULL);
- if (hStatus != NO_ERROR)
- {
- // Do work....
- }
- void f()
- {
- std::clock_t init = std::clock();
- // perform some operations
- std::clock_t end = std::clock();
- std::cout << end-init << " cpu ticks spent, or about "
- << (end-init)/CLOCKS_PER_SEC << " seconds." << std::endl;
- }
Add Comment
Please, Sign In to add comment