Skip to main content

Module timelog

Module timelog 

Source
Expand description

Time spent on tasks, and the focus session running now.

A session is a stretch of time given to one task, usually through the focus timer. Sessions are kept in plain files, one per month ($XDG_DATA_HOME/sioul/time/2026-10.toml), not in CalDAV: they are your record, other devices need not carry them, and a task’s file stays small. The session running now is kept on disk too (time/running.toml), so closing the window does not lose it.

Time can also be noted by hand, for a task or for a project alone (a meeting, a call); billable time of a project carries, once billed, the number of its invoice, so it is never billed twice.

Each session says how its minutes were known (Kind): measured by the timer, typed by hand, or measured then corrected by hand. A typed duration is a memory, with its known bias (Roy, Christenfeld & McKenzie 2005), so the estimate’s correction counts it little (capacity, docs/capacity.md).

Structs§

Month 🔒
Running
The focus session running now.
Session
Time given to one task, or to a project.

Enums§

Kind
How a session’s minutes were known.

Constants§

OPEN_ENDED_CEILING 🔒
Minutes an open-ended session counts at most: one left running all night is not a night’s work.

Functions§

change_in
The session key names, changed by change: in place within its month; moved to another month, written there first, then taken out of its old one, so that nothing is lost on the way. Returns whether it was found.
change_running
change_running_in
The running session, as the file holds it now, changed by change and kept, all under the file’s lock, which the sharing takes too: a press is set over the session as it is then. Whether one was running.
finish
finish_in
Ends the running session: recorded, then forgotten. A session left running for hours (the window closed, a night passed) counts only the time chosen; an open-ended one (planned 0), three hours at most.
finish_noted_in
Ends the running session kept in dir, with where you stopped.
finish_with_note
Ends the running session with where you stopped.
folder
Where the sessions are kept.
keep_running
keep_running_in
Keeps the running session, or forgets it (None).
month_file 🔒
record
Adds a session to its month’s file.
record_in
Adds a session to its month’s file, in dir, with an id of its own when it has none.
remove_in
Takes out the sessions keys names (time noted by mistake).
running
running_in
The session running now, if any.
running_path 🔒
sessions
Every session, oldest first.
sessions_in
Every session kept in dir, oldest first.
spent
Minutes spent on each task, by UID, between two instants (Unix seconds).
update_in
Changes the sessions keys names with change, in their month files in dir; returns how many were changed.
write_atomically 🔒