OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [trunk/] [fp/] [implementation/] [mmix/] [abstime.w] - Blame information for rev 119

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 15 hellwig
\datethis
2
\def\title{ABSTIME}
3
@* Intro. This tiny program prints the number of seconds
4
elapsed since 00:00:00 Greenwich Mean Time
5
on January 1, 1970. (Greenwich Mean Time is now more properly
6
called Coordinated Universal Time, or UTC.)
7
 
8
On January 19, 2038, at 03:14:08 UTC,
9
a 32-bit signed integer will become too small to hold the
10
desired result. (The number of elapsed seconds will then be $2^{31}$.)
11
This program will still work on
12
January 20 of that year if it has been compiled
13
with a \CEE/ compiler that has type \&{time\_t}
14
equivalent to \&{long}, provided that \&{long} integers
15
hold more than 32 bits.
16
 
17
@c
18
#include 
19
#include 
20
@#
21
main()
22
{
23
  printf("#define ABSTIME %ld\n",time(NULL));
24
  return 0;
25
}
26
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.