Swatch Time
#include <iostream>
#include <ctime>
using namespace std;
int main(){
time_t t;
time(&t);
struct tm *h = gmtime(&t);
int seg = h->tm_sec;
seg += (h->tm_hour * 3600);
seg += (h->tm_min * 60);
float c = (seg + 3600) / 86.375; /* + 3600 UTC + 1 */
cout << "Swatch Time: " << c << endl;
return 0;
}






There are currently no comments for this snippet.