|
1 | 1 | /* Copyright (c) 2013-2014 Anton Titov.
|
2 | 2 | * Copyright (c) 2013-2014 pCloud Ltd.
|
3 | 3 | * All rights reserved.
|
4 |
| - * |
| 4 | + * |
5 | 5 | * Redistribution and use in source and binary forms, with or without
|
6 | 6 | * modification, are permitted provided that the following conditions are met:
|
7 | 7 | * * Redistributions of source code must retain the above copyright
|
|
12 | 12 | * * Neither the name of pCloud Ltd nor the
|
13 | 13 | * names of its contributors may be used to endorse or promote products
|
14 | 14 | * derived from this software without specific prior written permission.
|
15 |
| - * |
| 15 | + * |
16 | 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
17 | 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
18 | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
36 | 36 | * (it is log TIMER_ARRAY_SIZE(timer_seconds_after_now)). So servicing a timer is
|
37 | 37 | * generally constant time task with a maximum constant of TIMER_LEVELS and increasing
|
38 | 38 | * TIMER_ARRAY_SIZE will trade memory for less processing for each timer.
|
39 |
| - * |
| 39 | + * |
40 | 40 | * TIMER_ARRAY_SIZE should be a power of two.
|
41 | 41 | */
|
42 | 42 |
|
@@ -139,7 +139,7 @@ static void timer_thread(){
|
139 | 139 | pthread_mutex_unlock(&timer_mutex);
|
140 | 140 | if (unlikely(!psync_list_isempty(&timers)))
|
141 | 141 | timer_process_timers(&timers);
|
142 |
| - if (unlikely(psync_current_time-lt>=20)) |
| 142 | + if (unlikely(psync_current_time-lt>=25)) |
143 | 143 | timer_sleep_detected(lt);
|
144 | 144 | else if (unlikely_log(psync_current_time==lt)){
|
145 | 145 | if (!psync_do_run)
|
|
0 commit comments