i want to convert from an integer to a string..in unix...i am writing a C program with embedded SQL...
I remeber using itoa...but for some reason it doesnt work......i cant find it in the manual.....
Maybe that is the wrong command.....
but i have checked Dev Studio.....and it doest exist in the... (6 Replies)
I'm new at scripting but I thought I was getting pretty good at it. I've hit a snag. I try to use expr to compute a fraction say: expr 3 / 4, and I'm getting zero. I guess it's just truncating to the integer, in this case 0, but I need the decimal 0.75. What can I do to compute this value in... (2 Replies)
Hi fellows!!
i'm doing something which is not working out for me properly which i don't understand why
nowdate=`date +%s`
echo $nowdate
now the problem how to convert a date which is stored in a variable
mydate="22/Oct/2011"
mydate=`date -d '$mydate' +%s`
it gives error... (11 Replies)
Hi All,
I want to convert string in format YYYYMMDD(20120607) to date in unix and add 1 day to it and convert back to string in format YYYYMMDD. Please help. (4 Replies)
Hi All,
sessionid_remote=$(echo "select odb_sessionid from sysopendb where odb_dbname='syscdr';" | sudo -u cucluster ssh ucbu-aricent-vm93 "source /opt/cisco/connection/lib/connection.profile; $INFORMIXDIR/bin/dbaccess sysmaster@ciscounity")
for sid in $sessionid_remote;do
if * ]];... (2 Replies)
Hi all,
I am trying to write a script to be able to
Run top command
Pick the PIDs that are taking more than 90% of CPU time
Get more details like what is the script name and location for that PID
Script should run until I manually kill it by ctrl + C
I have come up with following script... (3 Replies)
i have some set of date data inside csv files and need to convert the timezone,
08302016113611861
08302016113623442
08302016113541570
08302016113557732
08302016113548439
08302016112853115
08302016113620684
08302016113432827
08302016113630321
date format is : %m%d%Y%H%M%Smilisec
... (2 Replies)
Hi,
I have a requirement where I am getting date in string format (20161130). I need to add 20 days(not no. 20) to the above string. The o/p should 20161220.
In case of 20170228, it should show 20170320.
Could you please help me with the command to achieve this.
Note: I am using AIX 7.1... (5 Replies)
I have data as below
"ROWS merge process complete. thousand rows changed"
I need to get a variable assigned the value of 1000. I mean convert the string thousand to 1000.
Any help or pointer.
Please use CODE tags as required by forum rules! (6 Replies)
Discussion started by: dsravanam
6 Replies
LEARN ABOUT NETBSD
timer_gettime
TIMER_SETTIME(2) BSD System Calls Manual TIMER_SETTIME(2)NAME
timer_settime, timer_gettime, timer_getoverrun -- process timer manipulation
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <time.h>
int
timer_settime(timer_t timerid, int flags, const struct itimerspec * restrict tim, struct itimerspec * restrict otim);
int
timer_gettime(timer_t timerid, struct itimerspec *tim);
int
timer_getoverrun(timer_t timerid);
DESCRIPTION
The timer_settime() sets the next expiration time of the timer with ID timerid to the it_value (see itimerspec(3)) specified in the tim argu-
ment. If the value is 0, the timer is disarmed. If the argument otim is not NULL the old timer settingas are returned.
If the flags argument is set to TIMER_RELTIME then the expiration time is set to the value in nanoseconds specified in the tim argument from
the time the call to timer_settime() was made. If the flags argument is set to TIMER_ABSTIME then the expiration time is set to be equal to
the difference between the clock associated with this timer, and the value specified in the tim argument. If that time has already passed,
then the call succeeds, and the expiration notification occurs.
If the it_interval of the tim argument is non-zero, then the timer reloads upon expiration.
The timer_gettime() function returns the current settings of the timer specified by the timerid argument in the tim argument.
Only one notification event (signal) can be pending for a given timer and process. If a timer expires while the signal is still queued for
delivery, then the overrun counter for that timer is increased. The counter can store values up to DELAYTIMER_MAX. When the signal is
finally delivered to the process, then the timer_getoverrun() function can be used to retrieve the overrun counter for the timer specified in
the timerid argument.
NOTES
Expiration time values are always rounded up to the resolution of the timer, so a notification will never be sent before the requested time.
Values returned in the otim argument of timer_settime() or in the tim argment of timer_gettime() are subject to the above rounding effect and
might not exactly match the requested values by the user.
RETURN VALUES
If successful, the timer_gettime() and timer_settime() functions return 0, and the timer_getoverrun() function returns the expiration overrun
count for the specified timer. Otherwise, the functions return -1, and set errno to indicate the error.
ERRORS
The timer_gettime(), timer_getoverrun(), and timer_settime() functions will fail if:
[EINVAL] The argument timerid does not correspond to a valid timer id as returned by timer_create() or that timer id has been
deleted by timer_delete().
The timer_settime() function will fail if:
[EINVAL] A nanosecond field in the tim structure specified a value less than zero or greater than or equal to 10e9.
SEE ALSO clock_gettime(2), timer_create(2), timer_delete(2)STANDARDS
IEEE Std 1003.1b-1993 (``POSIX.1''), IEEE Std 1003.1i-1995 (``POSIX.1'')
BSD May 17, 2010 BSD