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

Subversion Repositories eco32

[/] [eco32/] [tags/] [eco32-0.26/] [fp/] [implementation/] [mmix/] [abstime.w] - Diff between revs 15 and 270

Only display areas with differences | Details | Blame | View Log

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

powered by: WebSVN 2.1.0

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