Commit graph

4 commits

Author SHA1 Message Date
Antonio Scandurra
25b0fbd679 Don't use clock_gettime on macOS
This commit stops using the monotonic clock API on macOS because it is 
supported only on macOS >= 10.12. Instead, it uses the fallback clock 
APIs for platforms without monotonic clock support.

The use of `clock_gettime` was causing issues on Atom because, even 
though we build it on a new macOS version supporting such API, some 
users may run Atom on older versions of macOS. On those platforms, Atom 
would crash whenever opening a file parsed with a tree-sitter grammar.
2019-06-12 19:03:46 +02:00
Max Brunsfeld
5a59f19b69 Use explicit syntax for functions with no parameters 2019-03-21 16:06:06 -07:00
Max Brunsfeld
74d154c706 Use CLOCK_MONOTONIC on platforms that support it
This way, timeouts will apply even if the current process
is starved for CPU.
2019-03-21 14:13:42 -07:00
Max Brunsfeld
88e3907cc0 Use QueryPerformanceFrequency as clock on windows 2019-03-14 13:42:31 -07:00