diff options
| author | Jakob Kaivo <jkk@ung.org> | 2020-08-16 14:00:51 -0400 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2020-08-16 14:00:51 -0400 |
| commit | 896e28812c51b9ffdf3efc00c7d7ef699e380a58 (patch) | |
| tree | aaa25e093fb4a2ac4c57609e1f745e5ac0734ca8 /src/time | |
| parent | 0b0d1fe1d4fbf8560577d81e5af0549683eac8ba (diff) | |
formatting
Diffstat (limited to 'src/time')
| -rw-r--r-- | src/time/CLOCKS_PER_SEC.c | 1 | ||||
| -rw-r--r-- | src/time/NULL.ref | 1 | ||||
| -rw-r--r-- | src/time/asctime.c | 3 | ||||
| -rw-r--r-- | src/time/clock.c | 1 | ||||
| -rw-r--r-- | src/time/clock_t.c | 4 | ||||
| -rw-r--r-- | src/time/size_t.ref | 1 | ||||
| -rw-r--r-- | src/time/strftime.c | 7 | ||||
| -rw-r--r-- | src/time/struct_tm.c | 6 | ||||
| -rw-r--r-- | src/time/time.c | 2 | ||||
| -rw-r--r-- | src/time/time_t.c | 5 |
10 files changed, 12 insertions, 19 deletions
diff --git a/src/time/CLOCKS_PER_SEC.c b/src/time/CLOCKS_PER_SEC.c index 7ef4bb89..e8e8350d 100644 --- a/src/time/CLOCKS_PER_SEC.c +++ b/src/time/CLOCKS_PER_SEC.c @@ -1,4 +1,3 @@ -#include <time.h> #define CLOCKS_PER_SEC ((clock_t)1000000) /** clock ticks per second **/ diff --git a/src/time/NULL.ref b/src/time/NULL.ref index 0ac4b016..b247705b 100644 --- a/src/time/NULL.ref +++ b/src/time/NULL.ref @@ -1,3 +1,2 @@ -#include <time.h> REFERENCE(stddef/NULL.c) STDC(1) diff --git a/src/time/asctime.c b/src/time/asctime.c index 06dceae8..1b96a6e0 100644 --- a/src/time/asctime.c +++ b/src/time/asctime.c @@ -1,7 +1,8 @@ +#include <stdio.h> #include <time.h> -#include "stdio.h" /** convert broken down time to string **/ + char * asctime(const struct tm * timeptr) { const char days[7][3] = { diff --git a/src/time/clock.c b/src/time/clock.c index a141e36d..bba89063 100644 --- a/src/time/clock.c +++ b/src/time/clock.c @@ -1,6 +1,7 @@ #include <time.h> /** get processor time **/ + clock_t clock(void) { return (clock_t)-1; diff --git a/src/time/clock_t.c b/src/time/clock_t.c index fe7a3842..d6e5d966 100644 --- a/src/time/clock_t.c +++ b/src/time/clock_t.c @@ -1,5 +1,5 @@ -#include <time.h> -typedef long int clock_t; +typedef long int + clock_t; /** clock ticks **/ diff --git a/src/time/size_t.ref b/src/time/size_t.ref index 75ce0309..fc611c25 100644 --- a/src/time/size_t.ref +++ b/src/time/size_t.ref @@ -1,3 +1,2 @@ -#include <time.h> REFERENCE(stddef/size_t.c) STDC(1) diff --git a/src/time/strftime.c b/src/time/strftime.c index c229e26d..dfb68276 100644 --- a/src/time/strftime.c +++ b/src/time/strftime.c @@ -1,7 +1,7 @@ +#include <locale.h> +#include <stdio.h> #include <time.h> -#include "stdio.h" #include "_assert.h" -#include "locale.h" #include "locale/_locale.h" /** convert time to a formatted string **/ @@ -189,8 +189,5 @@ UNDEFINED(Copying takes place between objects that overlap) LC_TIME RETURN_FAILURE(ZERO) RETURN_SUCCESS(the length of the converted string, not counting the terminating null) -*/ - -/* STDC(1) */ diff --git a/src/time/struct_tm.c b/src/time/struct_tm.c index 067d54f3..e7f0376f 100644 --- a/src/time/struct_tm.c +++ b/src/time/struct_tm.c @@ -1,7 +1,3 @@ -#include <time.h> - -/** broken-down time **/ - struct tm { int tm_sec; /* Seconds [0,60] */ int tm_min; /* Minutes [0, 59] */ @@ -14,6 +10,8 @@ struct tm { int tm_isdst; /* Daylight Saving Time flag */ }; +/** broken-down time **/ + /*** is used to represent time broken down into its individual components. ***/ diff --git a/src/time/time.c b/src/time/time.c index ca99964f..d6f4ba7f 100644 --- a/src/time/time.c +++ b/src/time/time.c @@ -1,5 +1,5 @@ #include <time.h> -#include "errno.h" +#include <errno.h> #include "_syscall.h" /** get current time **/ diff --git a/src/time/time_t.c b/src/time/time_t.c index df2f34e8..58cf3fb0 100644 --- a/src/time/time_t.c +++ b/src/time/time_t.c @@ -1,9 +1,8 @@ -#include <time.h> +typedef long int + time_t; /** time representation **/ -typedef long int time_t; - /*** is used for representing time. ***/ |
