Searched hist:12981 (Results 1 - 1 of 1) sorted by relevance
/gem5/src/base/ | ||
H A D | time.cc | 12981:efad272351e3 Tue Sep 11 03:59:00 EDT 2018 Gabe Black <gabeblack@google.com> base: Avoid dividing by zero in Time::[gs]etTick. Those functions used the value SimClock::Int::ns which, if the time resolution is larger than 1ns, can/will be zero. That will make getTick always return zero, and setTick divide by zero. This change modifies those functions so that the math they do avoids using any integer Ticks per time unit value except for Frequency. It seems unlikely that the Ticks will increment at less than 1Hz. Change-Id: I5cc9db14699c00dcbff48e4593b98522b13b4ccd Reviewed-on: https://gem5-review.googlesource.com/12573 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
Completed in 7 milliseconds