-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogram.c
More file actions
75 lines (59 loc) · 1.28 KB
/
Copy pathprogram.c
File metadata and controls
75 lines (59 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <stddef.h>
#include <time.h>
typedef struct Cadence {
int seconds;
int minutes;
int hours;
int days;
int weeks;
int month;
} Cadence;
struct Cadence cycle;
//time_t payload = time();
int main(void)
{
cycle.seconds = 6;
cycle.minutes = 5;
cycle.hours = 4;
cycle.days = 3;
cycle.weeks = 2;
cycle.month = 1;
printf("Seconds: %d\n", cycle.seconds);
int days[31];
time_t time(time_t *timer);
time_t now;
for (int i = 0; i < 3; i++)
{
now = time(NULL);
time_t * session;
struct tm *localTimeInfo;
localTimeInfo = localtime(&now);
char message[10];
printf("Local: %s", asctime(localTimeInfo));
printf("Msg %d: ", i);
scanf("%s", message);
printf("Next!\n");
days[i] = *(message);
}
printf("\n");
for (int x = 0; x < 3; x++)
{
printf("Msg %d: %c\n", x, days[x]);
}
//printf("Seconds since Epoch: %ld \n", session);
//struct tm start = {.tm_year=2025-1900, .tm_mday=1};
//mktime(&start);
// printf("Start: %s\n", &start);
//struct time_t payload;
//mktime(&session);
// const struct tm *session;
// const struct payload *current;
//long int wait;
// wait = sizeof(session);
//printf("Session: %s\n", ctime(&localTimeInfo));
//printf("sizeof: %s\n", asctime(&now));
return 0;
}