Skip to content

Commit

Permalink
get_time()サンプル
Browse files Browse the repository at this point in the history
  • Loading branch information
Blue-Crescent committed Feb 7, 2024
1 parent 5e4189b commit b1005b4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions examples/JJYreceiver.ino
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ void ticktock() { // 10 msec interrupt service routine

void loop() {
delay(10000);

time_t now = jjy.get_time();
if(now != -1){
time_t lastreceived = jjy.getTime();

if(lastreceived != -1){
String str = String(ctime(&now));
debugSerial.print(str); // Print current date time.

debugSerial.print(" Last received:");
time_t lastreceived = jjy.getTime();
debugSerial.print(" Last received:");
str = String(ctime(&lastreceived));
debugSerial.println(str); // Print last received time

Expand Down

0 comments on commit b1005b4

Please sign in to comment.