09-27-2010
run time misbehavior. it did timeout much before the absolute time passed as parameter.
ps: something strange here. in my browser I read that your first reply says 'clock_gettime', but in the notification I got via email it says 'clock_getres'.
10 More Discussions You Might Find Interesting
1. Programming
Hello there.. I need to know when i start indipendant
timers how can i recognize which of the active timers
have made timeout alarm.
The number of started timers depends on the running app
I'd appreciate your help
Thanks in advance (0 Replies)
Discussion started by: nightcat
0 Replies
2. UNIX for Advanced & Expert Users
Hi
what does the following mean in shell scripts (-h option)
val contains a string.
while (-h "$val") (1 Reply)
Discussion started by: Raom
1 Replies
3. UNIX for Advanced & Expert Users
We have started to us the su option on our production server. We log in with our own id and then su into a special id to perform various tasks. This allows our actions to be monitored.
I need to know how to use the su option when doing an ftp between two servers. I noticed that when I log into... (1 Reply)
Discussion started by: lesstjm
1 Replies
4. Programming
my yacc output file y.tab.c is not compiling using cc y.tab.c -ly command
.possibily option flag -ly is not correct.i m using red hat linux 9.please give solutions. (4 Replies)
Discussion started by: kuldeep_bora
4 Replies
5. Shell Programming and Scripting
Hi all,
I am parsing command line options using getopts.
The problem is that mandatory argument options following ":" is taking next option as argument if it is not followed by any argument.
Below is the script:
while getopts :hd:t:s:l:p:f: opt
do
case "$opt" in
-h|-\?)... (2 Replies)
Discussion started by: gurukottur
2 Replies
6. Programming
Hi ,
I am trying to learn timers in linux kernel. I am trying to write a program where I can configure a timer to tick in every 5 seconds and a function should thus exicute in every five seconds. I tried one program with the help of linux/timer.h headerfile but I couldnt get the... (4 Replies)
Discussion started by: iamjayanth
4 Replies
7. Shell Programming and Scripting
To find all the files in your home directory that have been edited in some way since the last tar file, use this command:
find . -newer backup.tar.gz
Is anyone familiar with an older solution?
looking to identify files older then 15mins across several directories.
thanks,
manny (2 Replies)
Discussion started by: mr_manny
2 Replies
8. Shell Programming and Scripting
Hi there. I am fairly new to scripting in BASH so please forgive my clumsy syntax and analogy as I try to explain what I am trying to accomplish.
I have a list of mundane functions that I currently call from a script file. What I wish to do is to accurately record into a log file the times that... (17 Replies)
Discussion started by: Tenuous
17 Replies
9. Shell Programming and Scripting
Hi,
I'm new to shell scripting and I'm trying to read some code I need to use. Could you help me out on what it's doing? I read this as.... if the directory has files then rm all the files in that directory. I'm not sure....
if ; then
run "rm -rf ${TSP_FILEPATH_PLUGIN_DIR}";
fi
run... (8 Replies)
Discussion started by: jdilts
8 Replies
10. Solaris
Hi,
I installed some packages required by an app built with python.
But when I try python setup.py install, I get the following error:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/5.2.0/../../../../sparc-sun-solaris2.10/bin/as: unrecognized option `-m32'
Could anyone tell me what's wrong... (4 Replies)
Discussion started by: Kimkun
4 Replies
LEARN ABOUT OSF1
clock_gettime
clock_gettime(3) Library Functions Manual clock_gettime(3)
NAME
clock_gettime, clock_settime - Obtains or sets the time for the specified clock (P1003.1b)
LIBRARY
Realtime Library (librt.so, librt.a)
SYNOPSIS
#include <time.h>
int clock_gettime (
clockid_t clock_id,
struct timespec *tp);
int clock_settime (
clockid_t clock_id,
const struct timespec *tp);
PARAMETERS
clock_id The clock type used to obtain the time for the clock that is set. The CLOCK_REALTIME clock is supported and represents the
TIME-OF-DAY clock for the system.
*tp A pointer to a timespec data structure.
DESCRIPTION
The clock_gettime function returns the current time (in seconds and nanoseconds) for the specified clock. The clock_settime function sets
the specified clock. The CLOCK_REALTIME clock measures the amount of time elapsed since 00:00:00:00 January 1, 1970 Greenwich Mean Time
(GMT), otherwise known as the Epoch. Time values that fall between two non-negative integer multiples of the resolution are truncated down
to the smaller multiple of the resolution.
You must have superuser privileges to use the clock_settime function.
RETURN VALUES
On a successful call to the clock_gettime or clock_settime functions, a value of 0 (zero) is returned.
On an unsuccessful call, a value of -1 is returned and errno is set to indicate that an error occurred.
ERRORS
The clock_gettime and clock_settime functions fail under the following conditions:
[EINVAL] The clock_id argument does not specify a known clock.
The value pointed to by the tp argument to the clock_settime function is outside the range for the given clock_id.
The tp argument specified a nanosecond value less than zero or greater than or equal to 1000 million.
[EPERM] The requesting process does not have the appropriate privilege to set the specified clock.
RELATED INFORMATION
Functions: time(1), clock_getres(3), ctime(3), timer_gettime(3)
Guide to Realtime Programming delim off
clock_gettime(3)