mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
change time_monotonic_ms() from time_t to int64_t
time_monotonic_ms values did wrap every ~24 days, leading to problems in code that did not cope with that. Instead of fixing all places where relative comparisons with time_monotonic_ms() are made, just use a bigger datatype. Convert all users to the new type.
This commit is contained in:
committed by
Jacek Jendrzej
parent
c7f429019d
commit
8dad062eff
@@ -1035,7 +1035,7 @@ int CStreamInfo2::update_rate ()
|
||||
usleep(timeout * 1000);
|
||||
b_len = mp->GetReadCount();
|
||||
} else {
|
||||
time_t start = time_monotonic_ms();
|
||||
int64_t start = time_monotonic_ms();
|
||||
/* always sample for ~100ms */
|
||||
while (time_monotonic_ms() - start < timeout)
|
||||
{
|
||||
@@ -1043,7 +1043,7 @@ int CStreamInfo2::update_rate ()
|
||||
if (ret >= 0)
|
||||
b_len += ret;
|
||||
}
|
||||
//printf("ts: read %d time %d\n", b_len, time_monotonic_ms() - start);
|
||||
//printf("ts: read %d time %" PRId64 "\n", b_len, time_monotonic_ms() - start);
|
||||
}
|
||||
//printf("ts: read %d\n", b_len);
|
||||
|
||||
|
Reference in New Issue
Block a user