Changes in / [f107afe:e6128959]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/time.cfa

    rf107afe re6128959  
    1010// Created On       : Tue Mar 27 17:24:56 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Apr 16 14:59:53 2021
    13 // Update Count     : 38
     12// Last Modified On : Thu Jul 18 21:56:01 2024
     13// Update Count     : 64
    1414//
    1515
    1616#include "time.hfa"
    1717#include <fstream.hfa>
     18#include <stdlib.h>                                                                             // putenv
     19
     20extern "C" size_t malloc_unfreed() { return 337; }              // unfreed storage from tzset
    1821
    1922int main() {
     23        // Set fixed time location to obtain repeatable output where ever run.
     24        putenv("TZ=America/Toronto");                                           // set fixed time zone
     25        tzset();                                                                                        // set time zone
     26
    2027        Duration d1 = 3`h, d2 = 2`s, d3 = 3.375`s, d4 = 12`s, d5 = 1`s + 10_000`ns;
    2128        sout | d1 | d2 | d3 | d4 | d5;
Note: See TracChangeset for help on using the changeset viewer.