mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Deprecate uXX and iXX bit suffixes.
Add experimental LL / ULL suffixes for int128 and uint128 literals.
This commit is contained in:
@@ -5,13 +5,13 @@ fn Time native_timestamp()
|
||||
{
|
||||
TimeSpec ts;
|
||||
posix::clock_gettime(posix::CLOCK_REALTIME, &ts);
|
||||
return (Time)(ts.s * 1_000_000i64 + ts.ns / 1_000i64);
|
||||
return (Time)(ts.s * 1_000_000L + ts.ns / 1_000L);
|
||||
}
|
||||
|
||||
fn Clock native_clock() @if(!env::DARWIN)
|
||||
{
|
||||
TimeSpec ts;
|
||||
posix::clock_gettime(posix::CLOCK_MONOTONIC, &ts);
|
||||
return (Clock)((ulong)ts.s * 1_000_000_000u64 + (ulong)ts.ns);
|
||||
return (Clock)((ulong)ts.s * 1_000_000_000UL + (ulong)ts.ns);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import std::os::win32;
|
||||
import std::math;
|
||||
|
||||
const ulong WINDOWS_TICK_US @local = 10;
|
||||
const ulong WIN_TO_UNIX_EPOCH_US @local = 116444736000000000u64 / WINDOWS_TICK_US;
|
||||
const ulong WIN_TO_UNIX_EPOCH_US @local = 116444736000000000UL / WINDOWS_TICK_US;
|
||||
|
||||
fn Clock native_clock()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user