Skip to content
ExamplesOpen editor ↗

paloYaMotsotswana

→ second()

Returns the second on the computer's clock, from 0 to 59.

paloYaMotsotswana()

It reads the clock on the reader’s own computer, in their local time — not world time. Someone in Gaborone and someone in London see different numbers.

It is not millis, which counts from the moment the sketch started. paloYaMotsotswana is the world’s time; millis is the sketch’s time.

It is paloYa…, not bare motsotswana. Had the name been just motsotswana, diri motsotswana = 5; would be refused — and a clock lesson is precisely where a child reaches for that word. The rule is that the naming words stay free.

A bar that fills once a minute
tiro setaLoeto() {
  thalaKanefase(400, 160);
  tlhalosa('Mothalo o o tletseng o o golang go ralala kanefase mo motsotsong mongwe le mongwe.');
}
tiro tshwantsha() {
  bokamorago(240);
  tlogelaMothalo();

  metlha b = lekanyetsa(paloYaMotsotswana(), 0, 60, 0, 360);

  tlatsaMmala(215, 220, 226);
  thalaKhutlonne(20, 60, 360, 40);

  tlatsaMmala(70, 150, 200);
  thalaKhutlonne(20, 60, b, 40);

  tlatsaMmala(40);
  bogoloJwaMokwalo(18);
  thalaMokwalo(paloYaMotsotswana() + 's', 20, 40);
}

paloYaMotsotso, paloYaUra, millis