summaryrefslogtreecommitdiff
path: root/common/loop.c
AgeCommit message (Collapse)AuthorLines
2018-10-17Increase _POSIX_C_SOURCE to 200112LFurkan Sahin-1/+1
CLOCK_MONOTONIC appeared in IEEE Std. 1003.1-200x, it was not part of POSIX.1b (the 1993 version), and FreeBSD treats it accordingly.
2018-10-15common/loop.c: add _POSIX_C_SOURCE for clock_gettime and CLOCK_MONOTONICFurkan Sahin-0/+1
2018-10-15Event loop: Fix memmove and remove extraneous declarationFurkan Sahin-1/+1
2018-10-14Event loop: Free fds and fix race conditionFurkan Sahin-0/+4
2018-10-14Remove timerfd from loop implementationFurkan Sahin-43/+100
timerfd doesn't work on the BSDs, so this replaces it with a timespec for the expiry and uses a poll timeout to check the timers when needed.
2018-10-13swaylock: Remove indicator after 3 secondsFurkan Sahin-3/+16
2018-10-13Move swaybar's event loop to common directory and refactorFurkan Sahin-0/+105
* The loop functions are now prefixed with `loop_`. * It is now easy to add timers to the loop. * Timers are implemented using pollfd and timerfd, rather than manually checking them when any other event happens to arrive.