Reputation: 61
In kernel i want compare jiffies with millisecond. Can we do like this with 5 ms in if statement? Can you help me?
jiffies>5
Upvotes: 0
Views: 1925
Reputation: 21507
From include/linux/jiffies.h
:
extern unsigned int jiffies_to_msecs(const unsigned long j);
If it's there for your kernel, convert jiffies to milliseconds and compare as you want:
#include <linux/jiffies.h>
...
... if (jiffies_to_msecs(jiffies)>5u) ....
Upvotes: 1