aboutsummaryrefslogtreecommitdiff
path: root/core/time
Commit message (Collapse)AuthorAgeFilesLines
* Enforce `core:builtin` and `core:intrinsics` for importsgingerBill2021-08-211-1/+1
|
* datetime_to_time's ok should default to true.Jeroen van Rijn2021-05-021-5/+4
|
* Replace many `foreign` llvm calls with intrinsicsgingerBill2021-04-251-5/+3
|
* Correct overflowed months.Jeroen van Rijn2021-03-231-1/+1
|
* Add core:datetime_to_timeJeroen van Rijn2021-03-231-0/+44
| | | | | | datetime_to_time takes separate parameters for date and time values and returns a time.Time and an `ok` bool. If the values are out of range, they're considered modulo and ok will be set to false.
* Minimize unneeded castsgingerBill2021-03-032-6/+6
|
* update essence API headernakst2021-02-261-1/+17
|
* Replace usage of `inline proc` with `#force_inline proc` in the core librarygingerBill2021-02-231-1/+1
|
* Update package reflectgingerBill2021-01-271-1/+11
|
* Add time.Tick for performance related timingsgingerBill2021-01-094-0/+78
|
* Switched to else instead of not equalPlatin212020-09-271-3/+1
|
* Adds when statement for framework includePlatin212020-09-271-1/+8
|
* Add `package path/filepath`; Add `os.stat` for windows (TODO: unix)gingerBill2020-09-252-5/+15
|
* Remove usage of `do` in core librarygingerBill2020-09-232-10/+14
|
* Get Odin compiling and produced exe's running on FreeBSDChristian Seibold2020-09-141-1/+1
|
* Fix #712gingerBill2020-08-261-2/+4
|
* Add `raw_data` to replace cases in which `&x[0]` was usedgingerBill2020-06-291-1/+1
|
* Begin migration from sys/win32 to sys/windowsgingerBill2020-06-261-5/+5
|
* Add `time.read_cycle_counter`gingerBill2020-06-221-0/+8
|
* Fix `time.now`gingerBill2020-06-192-6/+13
|
* `x if cond else y` and `x when cond else y` expressionsgingerBill2020-03-051-1/+1
|
* Implement core:thread and core:sync on Unix using pthreadsTetralux2019-12-014-102/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also do some cleanup and refactoring of the thread, sync and time APIs. - remove 'semaphore_release' because 'post' and 'wait' is easier to understand - change 'semaphore_wait' to '*_wait_for' to match Condition - pthreads can be given a stack, but doing so requires the user to set up the guard pages manually. BE WARNED. The alignment requirements of the stack are also platform-dependant; it may need to be page size aligned on some systems. Unclear which systems, however. See 'os.get_page_size', and 'mem.make_aligned'. HOWEVER: I was unable to get custom stacks with guard pages working reliably, so while you can do it, the API does not support it. - add 'os.get_page_size', 'mem.make_aligned', and 'mem.new_aligned'. - removed thread return values because windows and linux are not consistent; windows returns 'i32' and pthreads return 'void*'; besides which, if you really wanted to communicate how the thread exited, you probably wouldn't do it with the thread's exit code. - fixed 'thread.is_done' on Windows; it didn't report true immediately after calling 'thread.join'. - moved time related stuff out of 'core:os' to 'core:time'. - add 'mem.align_backward' - fixed default allocator alignment The heap on Windows, and calloc on Linux, both have no facility to request alignment. It's a bit of hack, but the heap_allocator now overallocates; `size + alignment` bytes, and aligns things to at least 2. It does both of these things to ensure that there is at least two bytes before the payload, which it uses to store how much padding it needed to insert in order to fulfil the alignment requested. - make conditions more sane by matching the Windows behaviour. The fact that they were signalled now lingers until a thread tries to wait, causing them to just pass by uninterrupted, without sleeping or locking the underlying mutex, as it would otherwise need to do. This means that a thread no longer has to be waiting in order to be signalled, which avoids timing bugs that causes deadlocks that are hard to debug and fix. See the comment on the `sync.Condition.flag` field. - add thread priority: `thread.create(worker_proc, .High)`
* Add missing foreign import to time_darwinChris Heyes2019-11-011-0/+2
|
* Move time code from os to time packageChris Heyes2019-11-011-10/+30
|
* Merge remote-tracking branch 'upstream/master'Chris Heyes2019-11-013-1/+3
|\
| * Change ODIN_OS string for osx from "osx" to "darwin" to allow for other ↵gingerBill2019-10-011-0/+0
| | | | | | | | platforms
| * New Essence OS layer; cross-compiling improvementsnakst2019-09-021-0/+2
| |
| * Fix parsing for procedure literals expression statements; improve assert ↵gingerBill2019-07-281-1/+1
| | | | | | | | performance; other minor fixes
* | Impl time for macOSChris Heyes2019-07-161-1/+32
|/
* Merge pull request #320 from thebirk/add-diff-to-timegingerBill2019-01-071-0/+4
|\ | | | | Added diff() to core:time.
| * Added diff() to core:time.thebirk2019-01-061-0/+4
| |
* | Vet time_linuxmatt2019-01-061-1/+0
|/
* set time_linux IS_SUPPORTED to trueMikkel Hjortshoej2018-12-081-1/+1
|
* Merge branch 'log_pr'Mikkel Hjortshoej2018-12-083-1/+7
|\
| * Add timestamp support using the new core:timeMikkel Hjortshoej2018-12-083-1/+9
| |
* | Add Linux support for core:timeJeroen van Rijn2018-12-081-0/+44
|/ | | | In addition to sleep() and now(), it also defines nanosleep(), boot_time() and seconds_since_boot()
* package time (windows only at the moment)gingerBill2018-12-082-0/+242