4

Just curious if there's some calculation that happens or what exactly because when I ran it on my machine it froze for a solid minute before giving me the difficulty....froze the whole machine nothing would respond. One thing to note is that monerod hadn't been running for but maybe 15 seconds before I ran ./monderod diff.

**Edit - I've since found that the freezing I experienced was due to my graphics driver.

gdoober
  • 685
  • 4
  • 14

1 Answers1

5

I may be wrong but I assume this is the code initialized when you run "diff" in monerod.


  uint64_t now = time(NULL);

  uint64_t diff = ts > now ? ts - now : now - ts;

  if (diff > 24*3600)

    strftime(buffer, sizeof(buffer), "%Y-%m-%d", &tm);

  else

    strftime(buffer, sizeof(buffer), "%I:%M:%S %p", &tm);

  return std::string(buffer);
}
Lurker
  • 473
  • 2
  • 10