Deprecate uXX and iXX bit suffixes.

Add experimental LL / ULL suffixes for int128 and uint128 literals.
This commit is contained in:
Christoffer Lerno
2025-05-13 23:48:59 +02:00
parent c528f53d58
commit abe4727c3a
25 changed files with 126 additions and 68 deletions

View File

@@ -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);
}

View File

@@ -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()
{