Commit Graph

16 Commits

Author SHA1 Message Date
Xiang Xiao f337cc1380 sched/clock/ timekeeping: Use clock_basetime() to initialize g_clock_wall_time to get the best initial RTC value and initialize g_clock_last_counter too since the hardware may not start counting from zero. 2018-11-12 07:00:41 -06:00
Xiang Xiao 46bd8798c5 ched/clock/: Remove g_monotonic_basetime and g_clock_monotonic_time since we don't need ensure monotonic time start from zero as state here: http://pubs.opengroup.org/onlinepubs/009696899/functions/clock_getres.html 2018-11-12 06:50:37 -06:00
Xiang Xiao 71ad1993f2 Move clock_timespec_[add|subtract] to include/nuttx/clock.h 2018-08-27 06:04:04 -06:00
Gregory Nutt 8fdbb1e0a4 Elimate use of the non-standard type systime_t and replace it the equivalent, standard type clock_t
Squashed commit of the following:

    sched:  Rename all use of system_t to clock_t.
    syscall:  Rename all use of system_t to clock_t.
    net:  Rename all use of system_t to clock_t.
    libs:  Rename all use of system_t to clock_t.
    fs:  Rename all use of system_t to clock_t.
    drivers:  Rename all use of system_t to clock_t.
    arch:  Rename all use of system_t to clock_t.
    include:  Remove definition of systime_t; rename all use of system_t to clock_t.
2018-06-16 12:16:13 -06:00
Jussi Kivilinna c57d49f420 clock: Add new type ssystime_t for relative 64-bit ticks, change ticks<->time conversion functions to use ssystime_t 2017-04-21 08:51:31 -06:00
Jussi Kivilinna 325ba1a803 clock: add clock_resynchronize and use subseconds RTC
Add clock_resynchronize for better synchronization of CLOCK_REALTIME and CLOCK_MONOTONIC to match RTC after resume from low-power state.

Add up_rtc_getdatetime_with_subseconds under CONFIG_ARCH_HAVE_RTC_SUBSECONDS to allow initializing (and resynchronizing) system clock with subseconds accuracy RTC.
2017-04-21 08:45:57 -06:00
Gregory Nutt 3404b3cb4a sched/: Review and correct some stylistic inconsistencies 2016-08-07 08:32:11 -06:00
Gregory Nutt 246773faa7 Rename CONFIG_SCHED_TIMEKEEPING to CONFIG_CLOCK_TIMEKEEPING. That is a better compartmentalized name. 2016-07-11 06:54:02 -06:00
Max Neklyudov 8db29071da timekeeping: initial implementation 2016-07-10 16:14:25 -06:00
Gregory Nutt cb9e27c3b0 Standardize naming used for public data and function groupings 2015-10-02 16:30:35 -06:00
Gregory Nutt 99664b7811 Sporadic scheduler: Add logic to collection the partial timer expiration when a sporadic thread is suspended in tickless mode 2015-07-26 15:03:47 -06:00
Gregory Nutt 8d43a6bdcd Fix build error with CONFIG_SYSTEM_TIME64 2014-10-03 10:20:46 -06:00
Gregory Nutt c19659d7d2 Fixes to clock bias logic. Remove vestiges of g_tickbias; apply bias instead to g_basetime 2014-09-10 16:36:25 -06:00
Gregory Nutt fc7bd31e07 last change alters semantics of __HAVE_KERNEL_GLOBALS 2014-08-30 14:44:48 -06:00
Gregory Nutt 9ab67dce75 In some configurations, g_system_tmer must be extern'ed as a private variable 2014-08-28 17:00:03 -06:00
Gregory Nutt d4b56eb3cc Move clock functions from sched/ to sched/clock 2014-08-08 14:43:02 -06:00