Skip to content
Snippets Groups Projects
Commit b433830d authored by thinkerou's avatar thinkerou
Browse files

Fixed code format

parent 614e6f9e
No related branches found
No related tags found
No related merge requests found
...@@ -92,8 +92,9 @@ static gpr_timespec to_seconds_from_sub_second_time(int64_t time_in_units, ...@@ -92,8 +92,9 @@ static gpr_timespec to_seconds_from_sub_second_time(int64_t time_in_units,
if (time_in_units >= 0) { if (time_in_units >= 0) {
out.tv_sec = time_in_units / units_per_sec; out.tv_sec = time_in_units / units_per_sec;
} else { } else {
out.tv_sec = (-((units_per_sec - 1) - out.tv_sec = (-((units_per_sec - 1) - (time_in_units + units_per_sec)) /
(time_in_units + units_per_sec)) / units_per_sec) - 1; units_per_sec) -
1;
} }
out.tv_nsec = (int32_t)((time_in_units - out.tv_sec * units_per_sec) * out.tv_nsec = (int32_t)((time_in_units - out.tv_sec * units_per_sec) *
GPR_NS_PER_SEC / units_per_sec); GPR_NS_PER_SEC / units_per_sec);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment