Lap-Time Format
Lap times are stored internally as milliseconds (lapTimeMs)
and displayed using the format string family m:ss.000.
Storage
Across the API, all timing values use these conventions:
| Field | Type | Unit | Example |
|---|---|---|---|
lapTimeMs | int64 | ms | 92345 (= 1:32.345) |
sectorTimeMs | int64[] | ms | [31050, 30200, 31095] |
pitTimeMs | int64 | ms | 21345 |
This keeps arithmetic exact — Avg(laps.lapTimeMs) doesn't lose
precision the way decimal-seconds would.
Display
The default format string is m:ss.000:
| Stored ms | Display |
|---|---|
92345 | 1:32.345 |
60001 | 1:00.001 |
45123 | 0:45.123 |
3661234 | 61:01.234 (note: minutes don't roll over to hours unless you use h:mm:ss.000) |
Other useful format strings:
| Format | 92345 ms becomes | Use case |
|---|---|---|
m:ss.000 | 1:32.345 | Lap time |
m:ss.fff | 1:32.345 | Same — f is alias for 0 |
s.fff | 92.345 | Sector / delta |
h:mm:ss.000 | 0:01:32.345 | Endurance race elapsed |
+s.fff | +92.345 | Signed delta |
Highlights
The Run Sheet Main tab applies HH-DM-style chip highlights:
| Colour | When |
|---|---|
Purple (#A855F7) | Session fastest lap or sector |
Green (#22C55E) | Personal best for the car |
| (default) | Regular lap |
The colours are defined in
apps/client/lib/src/theme/race_theme.dart as
RaceColors.fastestPurple and RaceColors.personalBestGreen.
Editing lap times
In the Run Sheet Main tab, you can type a lap time as either:
"1:32.345"— minutes:seconds.thousandths"92.345"— total seconds with decimal"92345"— raw milliseconds
The editor parses all three formats and stores the canonical millisecond integer.
What's coming
- Configurable highlight thresholds — today they're hard-coded to "fastest" and "personal best"
- Class-relative highlights — fastest in class, not just overall
- Sector-by-sector best of best stitching