KTIME_SUB(9) Driver Basics KTIME_SUB(9)NAME
ktime_sub - subtract two ktime_t variables
ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs);
Returns the remainder of the subtraction
COPYRIGHT Kernel Hackers Manual 3.10 June 2014 KTIME_SUB(9)
Check Out this Related Man Page
SCHEDULE_HRTIMEOUT_R(9) Driver Basics SCHEDULE_HRTIMEOUT_R(9)NAME
schedule_hrtimeout_range - sleep until timeout
int __sched schedule_hrtimeout_range(ktime_t * expires, unsigned long delta, const enum hrtimer_mode mode);
timeout value (ktime_t)
slack in expires timeout (ktime_t)
timer mode, HRTIMER_MODE_ABS or HRTIMER_MODE_REL
Make the current task sleep until the given expiry time has elapsed. The routine will return immediately unless the current task state has
been set (see set_current_state).
The delta argument gives the kernel the freedom to schedule the actual wakeup to a time that is both power and performance friendly. The
kernel give the normal best effort behavior for "expires+delta", but may decide to fire the timer earlier, but no earlier than expires.
You can set the task state as follows -
TASK_UNINTERRUPTIBLE - at least timeout time is guaranteed to pass before the routine returns.
TASK_INTERRUPTIBLE - the routine may return early if a signal is delivered to the current task.
The current task state is guaranteed to be TASK_RUNNING when this routine returns.
Returns 0 when the timer has expired otherwise -EINTR
COPYRIGHT Kernel Hackers Manual 3.10 June 2014 SCHEDULE_HRTIMEOUT_R(9)
I'm having two fields in the file
Now, I need to compare this with current date & time and need to return the difference value in hours. Already, I checked with datecalc from the forum. So, need hints from Shell Gurus.
Thanks (10 Replies)
How to validate the 4th column,it is date column in the file, if it valid move to valid file else moved invalid file.
i want two file valid.txt and invalid.txt
Thanks, (7 Replies)
I have 2 questions.
I have a file with many rows which has date of the format YYYYMMDD.
1. I need to change the date to that weeks friday date(Ex: 20120716(monday) to 20120720). Satuday/Sunday has to be changed to next week friday date too.
2. After converting the date to... (10 Replies)
What I would like to do is a shell script which will read a database file, then it will compare the current date/hour/minute in each line existing in the database file.
Today is 20140305 (year_month_day) & assume that the time is 15:11 at the moment.
... (5 Replies)
I wrote this kernel module to test the correctness of ndelay() function.
static int __init initialize(void)
ktime_t start, end;
s64... (1 Reply)