Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
9dea7444
Commit
9dea7444
authored
Sep 28, 2004
by
Mike Hibler
Browse files
Do runtime loading of strftime function from POSIX module
parent
bb4adae3
Changes
1
Show whitespace changes
Inline
Side-by-side
tmcd/common/libsetup.pm
View file @
9dea7444
...
...
@@ -38,9 +38,6 @@ use English;
# The tmcc library.
use
libtmcc
;
# For timestamps
use
POSIX
qw(strftime)
;
#
# This is the VERSION. We send it through to tmcd so it knows what version
# responses this file is expecting.
...
...
@@ -1316,6 +1313,7 @@ sub TBForkCmd($) {
# TBTimeStamp()
#
my
$imported_hires
=
0
;
my
$imported_POSIX
=
0
;
sub
TBTimeStamp
()
{
...
...
@@ -1327,6 +1325,11 @@ sub TBTimeStamp()
}
my
(
$seconds
,
$microseconds
)
=
Time::HiRes::
gettimeofday
();
if
(
!
$imported_POSIX
)
{
require
POSIX
;
import
POSIX::
strftime
;
$imported_POSIX
=
1
;
}
return
POSIX::
strftime
("
%H:%M:%S
",
localtime
(
$seconds
))
.
"
:
$microseconds
";
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment