Quote:
Originally Posted by
mrwatkin
Nope. Not if I'm pulling the last entry in the log like I'm tailing it. I want to compare that last entry to a previous timestamp of when I started a timer.
It appears that I still don't have a proper answer here. I'll keep looking.
In your original post, you had posted
$s = gettimeofday(); (which you seem to have edited and removed most of the initial entries). Now you say that you "want to compare that last entry to a previous timestamp".
gettimeofday() gives the current time in seconds from epoch. So why would you want to do
my $timeelapsed = $logTimeStamp - $s;? Wouldn't this result in a negative number getting stored in $logTimeStamp?
You may keep looking, but if the requirements are not clear or if you keep editing your original posts, then we may not be able to help you much.
Best Wishes,
balajesuri