Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177730589
D60972.1795147555.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
427 B
Referenced Files
None
Subscribers
None
D60972.1795147555.diff
View Options
diff --git a/sys/sys/time.h b/sys/sys/time.h
--- a/sys/sys/time.h
+++ b/sys/sys/time.h
@@ -434,6 +434,14 @@
return (seconds * 1000000000ULL);
}
+static inline uint64_t
+MSEC_TO_NSEC(uint64_t milliseconds)
+{
+ if (milliseconds > UINT64_MAX / 1000000ULL)
+ return UINT64_MAX;
+ return milliseconds * 1000000ULL;
+}
+
#endif
/* Operations on timespecs */
#define timespecclear(tvp) ((tvp)->tv_sec = (tvp)->tv_nsec = 0)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 20, 4:05 AM (3 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41237460
Default Alt Text
D60972.1795147555.diff (427 B)
Attached To
Mode
D60972: introduce MSEC_TO_NSEC()
Attached
Detach File
Event Timeline