diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-10-01 23:07:26 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-10-01 23:07:26 +0200 |
commit | d4f6d2f08f228778fd7744554d8b12be05b6a114 (patch) | |
tree | 2ccc39d16d3a5be27c54e03a81d2d3f75cfb9266 /include/my_sys.h | |
parent | 3744b8ae3171fd423f89c64a83d3afc7e3722856 (diff) | |
parent | dd8833bff0af1b75e007e3db1d18debfb7c4a096 (diff) | |
download | mariadb-git-d4f6d2f08f228778fd7744554d8b12be05b6a114.tar.gz |
Merge branch '10.3' into 10.4
Diffstat (limited to 'include/my_sys.h')
-rw-r--r-- | include/my_sys.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index fbb46d7a6e0..437f2d946e6 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -964,6 +964,17 @@ extern ulonglong my_getcputime(void); #define hrtime_sec_part(X) ((ulong)((X).val % HRTIME_RESOLUTION)) #define my_time(X) hrtime_to_time(my_hrtime_coarse()) +/** + Make high resolution time from two parts. +*/ + +static inline my_hrtime_t make_hr_time(my_time_t time, ulong time_sec_part) +{ + my_hrtime_t res= {((ulonglong) time)*1000000 + time_sec_part}; + return res; +} + + #if STACK_DIRECTION < 0 #define available_stack_size(CUR,END) (long) ((char*)(CUR) - (char*)(END)) #else |