How can I get the time in milliseconds in Perl without installing any extra package?
I am running Linux.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Time::HiReshas been part of the core since Perl 5.7.3. To check for its availability, check for the Perl version,perl -v, or try to use it withperl -e 'use Time::HiRes;', both from the command line.Sample usage:
To build on Konerak’s comment, if it isn’t there or it cannot be used, use native Linux commands via backticks: