How to use high-resolution gettimeofday in Perl

In some cases, you may need to measure time in high-resolution, for example, microsecond resolution as provided by gettimeofday() system call. In order to use microsecond-resolution time in Perl, you can use Time::HiRes Perl module which provides gettimeofday() microsecond-resolution timer function. To install Time::HiRes on Linux, run the following. $ sudo perl -MCPAN -e ‘install […]
Continue reading…