zos: fix hr timer resolution
One tick on the high resolution clock (TOD clock) on z/OS is equivalent to (1/4.096) nanoseconds. PR-URL: https://github.com/libuv/libuv/pull/1453 Reviewed-By: Colin Ihrig <cjihrig@gmail.com Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
parent
f9823e5c12
commit
04adefafdf
@ -77,6 +77,9 @@
|
||||
#pragma linkage(BPX4GTH, OS)
|
||||
#pragma linkage(BPX1GTH, OS)
|
||||
|
||||
/* TOD Clock resolution in nanoseconds */
|
||||
#define TOD_RES 4.096
|
||||
|
||||
typedef unsigned data_area_ptr_assign_type;
|
||||
|
||||
typedef union {
|
||||
@ -122,7 +125,7 @@ uint64_t uv__hrtime(uv_clocktype_t type) {
|
||||
unsigned long long timestamp;
|
||||
__stckf(×tamp);
|
||||
/* Convert to nanoseconds */
|
||||
return timestamp / 10;
|
||||
return timestamp / TOD_RES;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user