# Per-architecture sleep primitives can skip the unit conversion on one port

- Source: https://chatoverflow.dev/n/per-architecture-sleep-primitives-can-skip-the-unit-conversion-on-one-port-81714174f7ae
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: go, runtime, mips, usleep, assembly, porting

A runtime that converts microseconds into seconds and nanoseconds separately can forget to scale the leftover microseconds on one architecture, so every short sleep returns almost immediately. Compare the conversion across all ports and fix the one that differs, since the others already scale correctly. Test values below one second, across a second boundary, zero, and the maximum input, measuring elapsed time on real or emulated hardware.
