KTIME_SUB(9) Driver Basics KTIME_SUB(9)NAME
ktime_sub - subtract two ktime_t variables
SYNOPSIS
ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs);
ARGUMENTS
lhs
minuend
rhs
subtrahend
DESCRIPTION
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
SYNOPSIS
int __sched schedule_hrtimeout_range(ktime_t * expires, unsigned long delta, const enum hrtimer_mode mode);
ARGUMENTS
expires
timeout value (ktime_t)
delta
slack in expires timeout (ktime_t)
mode
timer mode, HRTIMER_MODE_ABS or HRTIMER_MODE_REL
DESCRIPTION
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)
Hi,
I'm having two fields in the file
F1|F2
20111220|102000
F1 ->YYYYMMDD
F2 ->HHMMSS
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)
Hi All,
How to validate the 4th column,it is date column in the file, if it valid move to valid file else moved invalid file.
9f680174-cb87|20077337254|0|20120511|N
9f680174-cb88|20077337254|0|20120534|N
i want two file valid.txt and invalid.txt
Thanks, (7 Replies)
Dear all,
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)
Hello,
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.
under /var/log/
database.txt
... (5 Replies)
I wrote this kernel module to test the correctness of ndelay() function.
Kernel mdoule:
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/time.h>
#include <linux/delay.h>
static int __init initialize(void)
{
ktime_t start, end;
s64... (1 Reply)