hourEvent()

Examples

void setup() {
  noLoop();
}

void draw() {
  fill(BLACK);

  int h = hour();    // Values from 0 - 23

  // C-style string
  char str[10];
  snprintf(str, 10, "Hour: %d", h);

  text(str, 10, 28);
}

// The hourEvent() function is called every hour.
// Define ENABLE_HOUR_EVENT in settings.h, if you use this function.
void hourEvent() {
  redraw();
}

Description

The hourEvent() function is called when the hour is changed. If you use this function, you have to define "ENABLE_HOUR_EVENT" at settings.h.

Syntax

hourEvent()

Returns

void

Related

dayEvent()
minuteEvent()
secondEvent()

Back to index