Miscellaneous > Programming & Networking
32 hour clock
voidmain:
Uh, I don't understand what you mean.
Master of Reality:
my additions:
--- Code: ---
--- End code ---
those two bolded parts are what i meant above.
how would i print the day and year?
does the day and year stuff iadded look okay?
shit... i forgot to change it so the days go back to zero after 273
#include <stdio.h>
#include <unistd.h>
int main() {
int second;
int minute;
int hour;
int day;
int days;
int year;
second=0;minute=0;hour=0;day=6;days=199;year=2002;
while(1) {
if (second==59) {
second=0;
if (minute==59) {
minute=0;
if (hour==31) {
hour=0;
if (day==7) {
day=1;
if (hour!=31) {
days=days;
if (days==272) {
year++;
} else {
year=year
} else {
days++;
} else {
day++;
}
} else {
hour++;
}
} else {
minute++;
}
} else {
second++;
}
sleep(1);
printf("%0.2d:%0.2d:%0.2d 2d.2d \r",hour,minute,second,day,year);
fflush(0);
}
}
[/CODE]
those two bolded parts are what i meant above.
how would i print the day and year?
does the day and year stuff iadded look okay?
shit... i forgot to change it so the days go back to zero after 273
[ August 23, 2002: Message edited by: Master of Reality / Bob ]
[ August 23, 2002: Message edited by: Master of Reality / Bob ]
[ August 23, 2002: Message edited by: Master of Reality / Bob ]
[ August 23, 2002: Message edited by: Master of Reality / Bob ]
[ August 23, 2002: Message edited by: Master of Reality / Bob ]
smokey:
nice - a 32 hr day would be a change from the boring old 24hr day :D
I figured it out
In a 32hr Day there would be
- 45 seconds in a minute
- 60 minutes in an hour
- 32 hours in a day
- 2700 seconds in an hour as opposed to a 24hr day's 3600 seconds in an hour.
Now all I need to do is write a 12hr/24hr time to a 16hr/32hr time converter :D .
Gooseberry Clock:
Just write a script that converts the current time into Bob time.
Master of Reality:
--- Code: ---
--- End code ---
that will give
year, day (of year), hour, minute, seconds
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version