08-26-2010
Quote:
Originally Posted by
lforum
...
I actually want the time down to the millisecond level. So I want something like:
2010-08-26 06:50:55.23
Any idea how I would get this?
Use the Time::HiRes Perl module to determine the time up to the nearest microsecond.
Time::HiRes - search.cpan.org
tyler_durden
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hello everyone. im sure someone has run into the problem of timestamping files and end up haveing 2 files with the same name thus over writeing one of them.
In my application i am trying to get a timestamp w/ milliseconds but i am haveing no luck and finding an answer in the man pages.
I know... (3 Replies)
Discussion started by: Optimus_P
3 Replies
2. Programming
I need a c function which return the time in:
hour min sec and mil sec
I am writing on unix os. (3 Replies)
Discussion started by: kamil
3 Replies
3. Shell Programming and Scripting
how to use sleep comand for milliseconds? (3 Replies)
Discussion started by: brkavi_in
3 Replies
4. Shell Programming and Scripting
hello,
I have the uptime of the server showing as upTime=2427742050
How do I convert it to standard time.
Thanks
Chiru (1 Reply)
Discussion started by: chiru_h
1 Replies
5. Shell Programming and Scripting
How can i print the output of a perl script on a unix console and redirect the same in a log file under same directory simultaneously ?
Like in Shell script, we use tee, is there anything in Perl or any other option ? (2 Replies)
Discussion started by: butterfly20
2 Replies
6. Solaris
Hey everyone,
I'm coming from Linux where the top command gave me lots of process
info (particularly CPU time in milliseconds) and I'm trying to find
similar info in Solaris.
So far I've looked at prstat and ps but neither give cpu time in
milliseconds, both seem to have 1 second... (2 Replies)
Discussion started by: maniac_ie
2 Replies
7. Shell Programming and Scripting
I need to put a small delay into a shell script. I'm looking for something smaller than "sleep" - a second is way too long. I want to sleep something like 10 milliseconds. I've tried "usleep" and "nanosleep", but the script doesn't recognize them.
I'm using the bash shell but I'm willing to... (9 Replies)
Discussion started by: harmlesscat
9 Replies
8. UNIX for Beginners Questions & Answers
while I load the value using sqlldr the millisecond values not stored in oracle table.
Value:
'26-OCT-17 08.59.50.916000000 AM'
CTL field:
SRC_SYS_CRT_TS Position(23:48) "decode(:SRC_SYS_CRT_TS,null,sysdate-1,to_timestamp(:SRC_SYS_CRT_TS,'yyyy-mm-dd.hh24.mi.ss.FF'))",
... (1 Reply)
Discussion started by: priya1987
1 Replies
9. Shell Programming and Scripting
Hi All,
I have one file which contains time for request and response.
I want to calculate time difference in milliseconds for each line.
This file can contain 10K lines.
Sample file with 4 lines.
for first line.
Request Time: 15:23:45,255
Response Time: 15:23:45,258
Time diff... (6 Replies)
Discussion started by: Raza Ali
6 Replies
10. Shell Programming and Scripting
I am using Sun OS 5.10
I am Using nawk to extract specific column from csv file.
The third column of csv is the time in Milliseconds and I need to convert it to Date then save it in another csv file.
I am use this command to extract the columns I need and save it in tttn.csv
nawk 'BEGIN... (6 Replies)
Discussion started by: Hozaifa
6 Replies
LEARN ABOUT DEBIAN
perl::critic::policy::builtinfunctions::prohibitsleepviaselect
Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaUsercContributed Perl DPerl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect(3pm)
NAME
Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect - Use Time::HiRes instead of something like "select(undef, undef, undef,
.05)".
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
Conway discourages the use of "select()" for performing non-integer sleeps. Although documented in perlfunc, it's something that generally
requires the reader to read "perldoc -f select" to figure out what it should be doing. Instead, Conway recommends that you use the
"Time::HiRes" module when you want to sleep.
select undef, undef, undef, 0.25; # not ok
use Time::HiRes;
sleep( 0.25 ); # ok
CONFIGURATION
This Policy is not configurable except for the standard options.
SEE ALSO
Time::HiRes.
AUTHOR
Graham TerMarsch <graham@howlingfrog.com>
COPYRIGHT
Copyright (c) 2005-2011 Graham TerMarsch. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-06-07 Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect(3pm)