Skip to content

Gigasecond

Intro

A gigasecond is 10^9 (1,000,000,000) seconds.

Task

Given a moment, determine the moment that would be after a gigasecond has passed.

The Code

1
2
3
4
5
6
#include "gigasecond.h"

time_t gigasecond_after(time_t test)
{
    return test+1000000000;
}
1
2
3
4
5
6
7
8
#ifndef GIGASECOND_H
#define GIGASECOND_H

#include <time.h>

time_t gigasecond_after(time_t);

#endif

Last update: February 8, 2021

Comments