time_after(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ time_after(9) ✨

okay so bestie, welcome to the Kernel API Manual entry for time_after β€” yes that's the manual name, we're fancy now πŸ’… this whole page is literally just the kernel's way of asking "is a later than b?" and honestly? relatable.


🌸 NAME 🌸

time_after β€” returns true if the time a is after time b. that's it. that's the whole vibe. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

bool time_after (u64 a , u64 b );

look at her. so clean. so iconic. πŸ‘‘


πŸ“ ARGUMENTS πŸ“

  • a β€” the first thing we're comparing, and it's a u64. yes, specifically u64, no cap.
  • b β€” the second thing we're comparing, also a u64. they match, it's giving symmetry 🫢

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea: do this with <0 and >=0 to only test the sign of the result. like, only check the sign, nothing else β€” that's the whole trick.

and the compiler tea? a good compiler would generate better code for this (and a really good compiler wouldn't even care). gcc is currently neither 😭 like not one, not the other, just out here being mid. fr fr.


🌈 RETURN 🌈

true if time a is after time b, otherwise false. simple as that, bestie. no surprises, no plot twists πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

kernel file: ./tools/sched_ext/include/scx/common.bpf.h β€” go read her, iykyk ⭐

and the whole friend group:


ngl these are all gonna be on the exam and they're all just little time-comparison besties living their best lives 🌸

okay that's the page, mwah πŸ’– she lives in ./tools/sched_ext/include/scx and she's stamped October 2026 β€” go forth and compare your u64s responsibly, main character πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from