Skip to content

Microsoft Win32 API Timing Functions in VBA

License

Notifications You must be signed in to change notification settings

Serialcomms/API-Timing-Functions-VBA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

API Timing Functions VBA

Microsoft Win32 API Timing Functions in VBA7

VBA Function Description
timestamp() Returns VBA Time$ as string suffixed with Milliseconds, e.g. 18:45:00.567
kernel_sleep(10000) Sleeps for specified (10000) Milliseconds while keeping VBA responsive. Option to add your code in wait loop.
get_qpc_seconds() Returns number of Seconds since last system boot
get_qpc_milliseconds() Returns number of Milliseconds since last system boot
get_qpc_microseconds() Returns number of Microseconds since last system boot
Win32 Function References

Query Performance Frequency
Query Performance Counter

QPC functions can be used for time-interval measurements, e.g. before and after your code.