Using Perl to time Bash Calls – Bash fine grain timer

Using Perl to time Bash Calls – Bash fine grain timer

I was looking for a way to cross platform way to make a microsecond timer or anything less than one second for that matter in bash. Aside from doing a fork each time this function needs to be called, this is a pretty good alternative to c programming because it is quick and dirty. This function will allow us to be portable and not think too much about the implementation for the time being.

#!/usr/bin/perl
use strict;
use warnings;
use Time::HiRes qw(usleep nanosleep);
usleep(100);
ttessier

About ttessier

Professional Developer and Operator of SwhistleSoft
This entry was posted in Bash Scripting, Perl Scripting. Bookmark the permalink.

One Response to Using Perl to time Bash Calls – Bash fine grain timer

  1. Rattling nice style and wonderful written content , practically nothing else we want : D.

Leave a Reply

Your email address will not be published. Required fields are marked *