/nrf52832-nimble/rt-thread/components/drivers/rtc/ |
H A D | rtc.c | 11 * 2018-02-16 armink add auto sync time by NTP 14 #include <time.h> 20 /* Using NTP auto sync RTC time */ 22 /* NTP first sync delay time for network connect, unit: second */ 33 * Set system date(time not modify). 50 /* get current time */ in set_date() 51 now = time(RT_NULL); in set_date() 55 /* converts calendar time time into local time. */ in set_date() 67 /* converts the local time in time to calendar time. */ in set_date() 83 * Set system time(date not modify). [all …]
|
H A D | soft_rtc.c | 11 #include <time.h> 33 time_t *time; in soft_rtc_control() local 42 time = (time_t *) args; in soft_rtc_control() 43 *time = init_time + (rt_tick_get() - init_tick) / RT_TICK_PER_SECOND; in soft_rtc_control() 48 time = (time_t *) args; in soft_rtc_control() 49 init_time = *time - (rt_tick_get() - init_tick) / RT_TICK_PER_SECOND; in soft_rtc_control()
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/core/ |
H A D | timeouts.c | 144 * there are active (or time-wait) PCBs. 195 * @param msecs time in milliseconds after that the timer should expire 227 timeout->time = msecs + diff; in sys_timeout_debug() 239 if (next_timeout->time > msecs) { in sys_timeout_debug() 240 next_timeout->time -= msecs; in sys_timeout_debug() 245 timeout->time -= t->time; in sys_timeout_debug() 246 if (t->next == NULL || t->next->time > timeout->time) { in sys_timeout_debug() 248 t->next->time -= timeout->time; in sys_timeout_debug() 249 } else if (timeout->time > msecs) { in sys_timeout_debug() 253 this is not wanted, so add the first timer's time instead of 'diff' */ in sys_timeout_debug() [all …]
|
/nrf52832-nimble/rt-thread/components/libc/time/ |
H A D | clock_time.c | 20 time_t time; in clock_time_system_init() local 24 time = 0; in clock_time_system_init() 29 rt_device_control(device, RT_DEVICE_CTRL_RTC_GET_TIME, &time); in clock_time_system_init() 36 _timevalue.tv_sec = time - tick/RT_TICK_PER_SECOND - 1; in clock_time_system_init() 42 int clock_time_to_tick(const struct timespec *time) in clock_time_to_tick() argument 48 RT_ASSERT(time != RT_NULL); in clock_time_to_tick() 51 if (time != NULL) in clock_time_to_tick() 56 if ((time->tv_nsec - tp.tv_nsec) < 0) in clock_time_to_tick() 58 nsecond = NANOSECOND_PER_SECOND - (tp.tv_nsec - time->tv_nsec); in clock_time_to_tick() 59 second = time->tv_sec - tp.tv_sec - 1; in clock_time_to_tick() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-1.4.1/src/core/ |
H A D | timers.c | 98 * there are active (or time-wait) PCBs. 257 * @param msecs time in milliseconds after that the timer should expire 279 timeout->time = msecs; in sys_timeout_debug() 291 if (next_timeout->time > msecs) { in sys_timeout_debug() 292 next_timeout->time -= msecs; in sys_timeout_debug() 297 timeout->time -= t->time; in sys_timeout_debug() 298 if (t->next == NULL || t->next->time > timeout->time) { in sys_timeout_debug() 300 t->next->time -= timeout->time; in sys_timeout_debug() 338 /* If not the last one, add time of this one back to next */ in sys_untimeout() 340 t->next->time += t->time; in sys_untimeout() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/core/ |
H A D | timeouts.c | 72 /* Check if timer's expiry time is greater than time and care about u32_t wraparounds */ 163 * there are active (or time-wait) PCBs. 197 timeout->time = abs_time; in sys_timeout_abs() 209 if (TIME_LESS_THAN(timeout->time, next_timeout->time)) { in sys_timeout_abs() 214 if ((t->next == NULL) || TIME_LESS_THAN(timeout->time, t->next->time)) { in sys_timeout_abs() 281 * @param msecs time in milliseconds after that the timer should expire 297 …LWIP_ASSERT("Timeout time too long, max is LWIP_UINT32_MAX/4 msecs", msecs <= (LWIP_UINT32_MAX / 4… in sys_timeout_debug() 373 if (TIME_LESS_THAN(now, tmptimeout->time)) { in sys_check_timeouts() 381 current_timeout_due_time = tmptimeout->time; in sys_check_timeouts() 385 tmptimeout->handler_name, sys_now() - tmptimeout->time, arg)); in sys_check_timeouts() [all …]
|
/nrf52832-nimble/rt-thread/components/libc/compilers/newlib/ |
H A D | time.c | 9 #include <sys/time.h> 15 time_t time; in gettimeofday() local 21 rt_device_control(device, RT_DEVICE_CTRL_RTC_GET_TIME, &time); in gettimeofday() 24 tp->tv_sec = time; in gettimeofday() 28 return time; in gettimeofday() 36 * Returns the current time. 45 #pragma module_name = "?time" 48 time_t time(time_t *t) in time_t()
|
H A D | syscalls.c | 11 #include <sys/time.h> 246 #include <time.h> 282 time_t time; in libc_system_time_init() local 286 time = 0; in libc_system_time_init() 291 rt_device_control(device, RT_DEVICE_CTRL_RTC_GET_TIME, &time); in libc_system_time_init() 298 _timevalue.tv_sec = time - tick/RT_TICK_PER_SECOND - 1; in libc_system_time_init() 302 int libc_get_time(struct timespec *time) in libc_get_time() argument 307 RT_ASSERT(time != RT_NULL); in libc_get_time() 309 /* initialize system time */ in libc_get_time() 319 time->tv_sec = _timevalue.tv_sec + tick / RT_TICK_PER_SECOND; in libc_get_time() [all …]
|
H A D | libc.h | 16 #include <sys/time.h> 34 /* some time related function */ 35 int libc_set_time(const struct timespec *time); 36 int libc_get_time(struct timespec *time); 37 int libc_time_to_tick(const struct timespec *time);
|
/nrf52832-nimble/rt-thread/components/libc/compilers/dlib/ |
H A D | time.c | 9 #include <sys/time.h> 15 time_t time; in gettimeofday() local 21 rt_device_control(device, RT_DEVICE_CTRL_RTC_GET_TIME, &time); in gettimeofday() 24 tp->tv_sec = time; in gettimeofday() 28 return time; in gettimeofday() 36 * Returns the current time. 43 #pragma module_name = "?time" 51 time_t time(time_t *t) in __time64()
|
/nrf52832-nimble/rt-thread/components/libc/compilers/armlibc/ |
H A D | time.c | 9 #include <sys/time.h> 15 time_t time; in gettimeofday() local 21 rt_device_control(device, RT_DEVICE_CTRL_RTC_GET_TIME, &time); in gettimeofday() 24 tp->tv_sec = time; in gettimeofday() 28 return time; in gettimeofday() 36 * Returns the current time. 45 #pragma module_name = "?time" 48 time_t time(time_t *t) in time_t()
|
/nrf52832-nimble/nordic/nrfx/drivers/include/ |
H A D | nrfx_systick.h | 54 * would be the highest supported time in the library. 66 uint32_t time; //!< Registered time value member 80 * It can be used to check time-out by @ref nrfx_systick_test. 87 * @brief Test if specified time is up in relation to remembered state 90 * @param[in] us Required time-out. 92 * @retval true If current time is higher than specified state plus given time-out. 93 * @retval false If current time is lower than specified state plus given time-out
|
/nrf52832-nimble/rt-thread/libcpu/arm/s3c24x0/ |
H A D | rtc.c | 15 #include <time.h> 26 * This function get rtc time 67 * This function set rtc time 129 time_t *time; in rtc_control() local 132 time = (time_t *)args; in rtc_control() 142 tm_ptr = localtime(time); in rtc_control() 173 time_t time; in list_date() local 179 rt_device_control(device, RT_DEVICE_CTRL_RTC_GET_TIME, &time); in list_date() 181 rt_kprintf("%d, %s\n", time, ctime(&time)); in list_date()
|
/nrf52832-nimble/packages/NimBLE-latest/docs/ble_setup/ |
H A D | ble_lp_clock.rst | 27 - Crystal settling time shall be set to non-zero value (see below) 50 Crystal settle time configuration 58 to accommodate this time. The amount of time required is board 61 microseconds is a fairly long time and was intended to work for most, if 64 Note that changing this time will impact battery life with the amount 66 current when running so keeping this time as small as possible will
|
/nrf52832-nimble/packages/NimBLE-latest/nimble/controller/include/controller/ |
H A D | ble_ll_sched.h | 27 /* Time per BLE scheduler slot */ 32 * Worst case time needed for scheduled advertising item. This is the longest 33 * possible time to receive a scan request and send a scan response (with the 34 * appropriate IFS time between them). This number is calculated using the 36 * Note: worst case time to tx adv, rx scan req and send scan rsp is 1228 usecs. 43 * NOTE: The advertising PDU transmit time is NOT included here since we know 63 * size PDU, including an IFS time before each. The actual time is 125 * txrx_offset: Number of ticks from start time until tx/rx should occur. 178 * returns 1 and *next_event_time is set to the start time of the next event.
|
/nrf52832-nimble/rt-thread/examples/libc/ |
H A D | ex7.c | 10 #include <sys/time.h> 28 struct timespec time; in test_thread() local 37 /* set the time out value */ in test_thread() 40 time.tv_sec = now.tv_sec + ms / 1000 + (now.tv_usec + (ms % 1000) * 1000) in test_thread() 42 time.tv_nsec = ((now.tv_usec + (ms % 1000) * 1000) % 1000000) * 1000; in test_thread() 44 /* Just use this to test the time out. The cond var is never signaled. */ in test_thread() 47 status = pthread_cond_timedwait(&foo.cond, &foo.mutex, &time); in test_thread()
|
H A D | time.c | 2 * time.c 17 printf("%d\n", time(0)); in speed() 19 t = time(0); in speed() 21 printf("%d\n", time(0)); in speed()
|
/nrf52832-nimble/packages/NimBLE-latest/nimble/host/mesh/src/ |
H A D | health_srv.c | 224 u8_t time; in send_attention_status() local 226 time = k_delayed_work_remaining_get(&srv->attn_timer) / 1000; in send_attention_status() 227 BT_DBG("%u second%s", time, (time == 1) ? "" : "s"); in send_attention_status() 231 net_buf_simple_add_u8(msg, time); in send_attention_status() 253 u8_t time; in attention_set_unrel() local 255 time = net_buf_simple_pull_u8(buf); in attention_set_unrel() 257 BT_DBG("%u second%s", time, (time == 1) ? "" : "s"); in attention_set_unrel() 259 bt_mesh_attention(model, time); in attention_set_unrel() 411 void bt_mesh_attention(struct bt_mesh_model *model, u8_t time) in bt_mesh_attention() argument 428 if (time) { in bt_mesh_attention() [all …]
|
/nrf52832-nimble/packages/NimBLE-latest/nimble/controller/src/ |
H A D | ble_ll_sched.c | 39 /* Settling time of crystal, in ticks */ 74 * Checks if two events in the schedule will overlap in time. NOTE: consecutive 75 * schedule items can end and start at the same time. 183 /* Better be past current time or we just leave */ in ble_ll_sched_conn_reschedule() 336 * earliest possible time that the master can start the connection with a in ble_ll_sched_master_new() 338 * connection request is sent an IFS time from the end of the advertising in ble_ll_sched_master_new() 339 * packet that was received plus the time it takes to send the connection in ble_ll_sched_master_new() 342 * receive end time tick (this would take too long), we assume the end of in ble_ll_sched_master_new() 344 * how much time it will take to service the ISR but if we are more than the in ble_ll_sched_master_new() 345 * rx to tx time of the chip we will not be successful transmitting the in ble_ll_sched_master_new() [all …]
|
/nrf52832-nimble/rt-thread/components/net/uip/uip/ |
H A D | uip_clock.h | 9 * The clock interface does only one this: it measures time. The clock 11 * second of system time. 67 * Get the current clock time. 69 * This function returns the current system clock time. 71 * \return The current clock time, measured in system ticks. 76 * A second, measured in system clock time.
|
H A D | uip-neighbor.c | 57 u8_t time; member 68 entries[i].time = MAX_TIME; in uip_neighbor_init() 78 if(entries[i].time < MAX_TIME) { in uip_neighbor_periodic() 79 entries[i].time++; in uip_neighbor_periodic() 98 if(entries[i].time == MAX_TIME) { in uip_neighbor_add() 106 if(entries[i].time > oldest_time) { in uip_neighbor_add() 108 oldest_time = entries[i].time; in uip_neighbor_add() 114 entries[oldest].time = 0; in uip_neighbor_add() 139 e->time = 0; in uip_neighbor_update()
|
/nrf52832-nimble/rt-thread/components/drivers/ |
H A D | Kconfig | 40 bool "Enable CPU time for high resolution clock counter" 44 for CPU time by: 59 bool "Use DWT for CPU time" 64 the cycle counter in DWT for CPU time. 130 bool "Using NTP auto sync RTC time" 136 int "NTP first sync delay time(second) for network connect" 255 int "Set scan timeout time(ms)" 259 int "Set connect timeout time(ms)"
|
/nrf52832-nimble/rt-thread/components/dfs/filesystems/jffs2/cyg/compress/src/ |
H A D | algorithm.txt | 55 but saves time since there are both fewer insertions and fewer searches. 74 How many bits to make the first lookup is a tradeoff between the time it 75 takes to decode and the time it takes to build the table. If building the 76 table took no time (and if you had infinite memory), then there would only 105 entries as needed. The idea is that most of the time the symbol will be short 119 more time filling in duplicate symbol entries than you do actually decoding. 124 that's essentially a Huffman tree. But then you spend two much time 127 So the number of bits for the first lookup table is a trade of the time to 128 fill out the table vs. the time spent looking at the second level and above of
|
/nrf52832-nimble/rt-thread/src/ |
H A D | mempool.c | 300 * @param time the waiting time 304 void *rt_mp_alloc(rt_mp_t mp, rt_int32_t time) in rt_mp_alloc() argument 320 if (time == 0) in rt_mp_alloc() 339 if (time > 0) in rt_mp_alloc() 347 &time); in rt_mp_alloc() 360 if (time > 0) in rt_mp_alloc() 362 time -= rt_tick_get() - before_sleep; in rt_mp_alloc() 363 if (time < 0) in rt_mp_alloc() 364 time = 0; in rt_mp_alloc()
|
/nrf52832-nimble/rt-thread/examples/test/ |
H A D | dhry.h | 19 * (8-17 Central European Time) 30 * In addition, Berkeley UNIX system calls "times ()" or "time ()" 31 * are used for execution time measurement. For measurements 105 * Since it has proven difficult to subtract the time for the 153 * or the "time" function (returning wallclock time) 155 * For single user machines, "time ()" is adequate. For 160 * and "Stop Timer". DO NOT use the UNIX "time(1)" 161 * command, as this will measure the total time to 163 * the time to allocate storage (malloc) and to perform 167 * time in 1/HZ seconds, with HZ = 60 for most systems. [all …]
|