AGENT SKILL

ac-time-and-clocks

Handling time correctly in software: monotonic versus wall clocks and what each is for, clock skew between machines, NTP and how clocks actually stay honest, UTC as a transport format and its local-presentation exceptions, the timezone database as a changing dependency, leap seconds and discontinuities, and the written time-policy record. It explains how software should treat time; it never recommends an NTP product and never converts times by guesswork. Use when asking "monotonic clock", "wall clock", "clock skew", "NTP", "UTC everywhere", "timezone database", "tzdata", "leap second", "why do my timestamps disagree", "time went backwards", "timer drift", "midnight boundary". Not for locale formatting of dates for users (ac-i18n-and-localisation), not for stream event-time semantics (ac-stream-processing), not for scheduled job semantics (ac-scheduled-jobs).

License 许可
MIT
最近更新
2026-11-15
Stars
★ 81
Forks
17

01 前言 Front Matter

name
ac-time-and-clocks
status
seedling
license
MIT
metadata
{ "domain": "software-engineering" }
description
Handling time correctly in software: monotonic versus wall clocks and what each is for, clock skew between machines, NTP and how clocks actually stay honest, UTC as a transport format and its local-presentation exceptions, the timezone database as a changing dependency, leap seconds and discontinuities, and the written time-policy record. It explains how software should treat time; it never recommends an NTP product and never converts times by guesswork. Use when asking "monotonic clock", "wall clock", "clock skew", "NTP", "UTC everywhere", "timezone database", "tzdata", "leap second", "why do my timestamps disagree", "time went backwards", "timer drift", "midnight boundary". Not for locale formatting of dates for users (ac-i18n-and-localisation), not for stream event-time semantics (ac-stream-processing), not for scheduled job semantics (ac-scheduled-jobs).

02 资源文件 10

03 SKILL.md 正文

Time and clocks

Overview

Software time is two different things wearing one word. The wall clock reads calendar time and can be corrected backwards by synchronisation; the monotonic clock only advances and exists to measure durations. Systems fail when the two are swapped: durations computed from wall-clock reads can come out negative after a correction, and timestamps stored in a machine's local zone become uninterpretable once it moves.

This skill covers the rules that keep each use correct: which clock for which purpose, how much skew to expect between machines and how to reason across it, UTC as the storage and transport format, the timezone database as an actively changing dependency that must be updated, and the rare discontinuities — leap seconds and zone redefinitions — that break systems that assumed time was smooth. Formatting time for a human reader belongs to the localisation skill; receiving and ordering events in streams to the stream skill.

Primary sources: https://www.rfc-editor.org/rfc/rfc3339 and https://www.rfc-editor.org/rfc/rfc5905.

When to use

  • Choosing which clock to read for a measurement or a timestamp.
  • Storing or exchanging times between processes and machines.
  • Reasoning about events whose timestamps came from different hosts.
  • Handling timezone database updates and time discontinuities.

When NOT to use

  • For presenting dates in a user's locale (use ac-i18n-and-localisation).
  • For event-time windows and watermarks (use ac-stream-processing).
  • For when a job should run (use ac-scheduled-jobs).

Subskill Index

Leaf Domain segment Scope (one line)
subskills/monotonic-versus-wall.md software-engineering/monotonic-versus-wall The two clocks, their guarantees, and the failure of using the wrong one.
subskills/clock-skew.md software-engineering/clock-skew How far machines disagree, and reasoning safely across their timestamps.
subskills/ntp-and-synchronisation.md software-engineering/ntp-and-synchronisation What NTP does and does not fix, and its own failure modes.
subskills/utc-storage-and-transport.md software-engineering/utc-storage-and-transport One zone for machines, local zones only at the human edge.
subskills/timezone-database.md software-engineering/timezone-database The rules change, and the binary carries them.
subskills/discontinuities.md software-engineering/discontinuities Leap seconds, zone redefinitions, and their absorbable risk.
subskills/time-policy-record.md software-engineering/time-policy-record The written record: clock choices, formats, zones, and update ownership.

Status and honest limits

Clock behaviour is a property of the runtime, the operating system, and the synchronisation setup, and all three vary: some monotonic clocks pause during suspend, some wall clocks step rather than slew, and zone rules change by government decision with little notice. The rules here are the discipline, but the deployed runtime's own documentation is the authority on its clock guarantees. Nothing recommends a specific time source, and any cross-machine ordering more precise than the measured skew is a claim the clocks cannot support.

04 同仓库更多 Skills

jiayaoqijia
jiayaoqijia/cryptoskill

troves

Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say "Troves" explicitly.

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

trade

Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say "swap".

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

staking

Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say "stake" explicitly.

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

send

Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say "pay 10 STRK to 0x...".

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

portfolio

View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks "what do I have", "show me everything", "how much am I worth", "my positions", "my investments", "rebalance my portfolio", "I want 50% ETH", "optimize my holdings", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say "portfolio".

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

multi-swap

Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions "two swaps", "three swaps", "swap X and Y at the same time", or wants to convert multiple tokens in a single call.

★ 81