Skip to content
Snippets Groups Projects
user avatar
Peter Maydell authored
Add a clock_ns_to_ticks() function which does the opposite of
clock_ticks_to_ns(): given a duration in nanoseconds, it returns the
number of clock ticks that would happen in that time.  This is useful
for devices that have a free running counter register whose value can
be calculated when it is read.

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Reviewed-by: default avatarLuc Michel <luc@lmichel.fr>
Reviewed-by: default avatarHao Wu <wuhaotsh@google.com>
Tested-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20210219144617.4782-4-peter.maydell@linaro.org
cd3a53b7
History
Name Last commit Last update