jiffies.h (271127) | jiffies.h (282513) |
---|---|
1/*- 2 * Copyright (c) 2010 Isilon Systems, Inc. 3 * Copyright (c) 2010 iX Systems, Inc. 4 * Copyright (c) 2010 Panasas, Inc. 5 * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 31 unchanged lines hidden (view full) --- 40{ 41 struct timeval tv; 42 43 tv.tv_sec = msec / 1000; 44 tv.tv_usec = (msec % 1000) * 1000; 45 return (tvtohz(&tv)); 46} 47 | 1/*- 2 * Copyright (c) 2010 Isilon Systems, Inc. 3 * Copyright (c) 2010 iX Systems, Inc. 4 * Copyright (c) 2010 Panasas, Inc. 5 * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 31 unchanged lines hidden (view full) --- 40{ 41 struct timeval tv; 42 43 tv.tv_sec = msec / 1000; 44 tv.tv_usec = (msec % 1000) * 1000; 45 return (tvtohz(&tv)); 46} 47 |
48 | |
49#define jiffies ticks 50#define jiffies_to_msecs(x) (((int64_t)(x)) * 1000 / hz) 51 | 48#define jiffies ticks 49#define jiffies_to_msecs(x) (((int64_t)(x)) * 1000 / hz) 50 |
52 53#define time_after(a, b) ((long)(b) - (long)(a) < 0) | 51#define time_after(a, b) ((int)((b) - (a)) < 0) |
54#define time_before(a, b) time_after(b,a) | 52#define time_before(a, b) time_after(b,a) |
55#define time_after_eq(a, b) ((long)(a) - (long)(b) >= 0) | 53#define time_after_eq(a, b) ((int)((a) - (b)) >= 0) |
56#define time_before_eq(a, b) time_after_eq(b, a) 57 58#define HZ hz 59 60#endif /* _LINUX_JIFFIES_H_ */ | 54#define time_before_eq(a, b) time_after_eq(b, a) 55 56#define HZ hz 57 58#endif /* _LINUX_JIFFIES_H_ */ |