Exetools  

Go Back   Exetools > General > Developer Section

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 12-31-2017, 17:35
rasta rasta is offline
Friend
 
Join Date: Oct 2013
Posts: 48
Rept. Given: 16
Rept. Rcvd 7 Times in 6 Posts
Thanks Given: 17
Thanks Rcvd at 20 Times in 16 Posts
rasta Reputation: 7
It would be much better if code snippets are 1 post for each, else if someone searches for global hotkeys will never search under code timing.

Btw Git, nice approach to detect beeing debugged.
Reply With Quote
The Following User Says Thank You to rasta For This Useful Post:
Indigo (07-19-2019)
  #2  
Old 01-03-2018, 17:34
chants chants is offline
VIP
 
Join Date: Jul 2016
Posts: 826
Rept. Given: 47
Rept. Rcvd 50 Times in 31 Posts
Thanks Given: 737
Thanks Rcvd at 1,140 Times in 529 Posts
chants Reputation: 51
That C code has become a bit prehistoric these days. I am not sure if timeb is portable either (though certainly with conditional compilation the prior snippet can be made to port on Windows and Linux for low 1ms resolution timer).

Here is STL C++ code for high resolution and portable code, requires no coding and mostly just ugly namespace declaration and templates.

Quote:
#include <chrono>
std::chrono::time_point<std::chrono::high_resolution_clock> start = std::chrono::high_resolution_clock::now();
//do things
std::chrono::duration<double, std::milli> elapsed = std::chrono::high_resolution_clock::now() - start;
printf("\nProcessing time %8.3f seconds\n", elapsed.count());
Reply With Quote
The Following 3 Users Say Thank You to chants For This Useful Post:
Indigo (07-19-2019), sendersu (01-03-2018), tonyweb (01-06-2018)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code snippet for Base34 Encoding TempoMat General Discussion 11 03-29-2020 17:58
Any ideas about executing phpinfo() in this code snippet XnHandt General Discussion 0 12-28-2012 00:46
How to execute a snippet of code before the main execution! Android General Discussion 8 10-04-2006 01:22


All times are GMT +8. The time now is 16:57.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )