mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Import timelib 2021.15
This commit is contained in:
parent
6cdfaf97e0
commit
0d3061d225
@ -405,12 +405,21 @@ timelib_time *timelib_sub_wall(timelib_time *old_time, timelib_rel_time *interva
|
||||
timelib_update_ts(t, NULL);
|
||||
}
|
||||
|
||||
do_range_limit(0, 1000000, 1000000, &interval->us, &interval->s);
|
||||
t->sse -= bias * timelib_hms_to_seconds(interval->h, interval->i, interval->s);
|
||||
timelib_update_from_sse(t);
|
||||
t->us -= interval->us * bias;
|
||||
if (bias == -1 && interval->us > 0) {
|
||||
t->sse++;
|
||||
if (interval->us == 0) {
|
||||
t->sse -= bias * timelib_hms_to_seconds(interval->h, interval->i, interval->s);
|
||||
timelib_update_from_sse(t);
|
||||
} else {
|
||||
timelib_rel_time *temp_interval = timelib_rel_time_clone(interval);
|
||||
|
||||
do_range_limit(0, 1000000, 1000000, &temp_interval->us, &temp_interval->s);
|
||||
t->sse -= bias * timelib_hms_to_seconds(temp_interval->h, temp_interval->i, temp_interval->s);
|
||||
timelib_update_from_sse(t);
|
||||
t->us -= temp_interval->us * bias;
|
||||
|
||||
timelib_do_normalize(t);
|
||||
timelib_update_ts(t, NULL);
|
||||
|
||||
timelib_rel_time_dtor(temp_interval);
|
||||
}
|
||||
timelib_do_normalize(t);
|
||||
}
|
||||
|
@ -30,9 +30,9 @@
|
||||
# include "timelib_config.h"
|
||||
#endif
|
||||
|
||||
#define TIMELIB_VERSION 202114
|
||||
#define TIMELIB_EXTENDED_VERSION 20211401
|
||||
#define TIMELIB_ASCII_VERSION "2021.14"
|
||||
#define TIMELIB_VERSION 202115
|
||||
#define TIMELIB_EXTENDED_VERSION 20211501
|
||||
#define TIMELIB_ASCII_VERSION "2021.15"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
|
Loading…
Reference in New Issue
Block a user