#1391·go

Implement new Concept Exercise: time-duration

Author: oanaOMCreated Jul 22, 2020Updated Apr 20, 2026
Labelsx:action/createx:knowledge/intermediatex:module/concept-exercisex:status/claimedx:type/contentx:size/large

This issue describes how to implement the time-duration concept exercise for the Go track.

Getting started

The docs can be found here

Goal

The goal of this exercise is to teach the student how concept time and duration is implemented in Go.

Learning objectives

  • Define the relation between time.Time and time.Duration.
  • Know how to measure time using time.Since ( e.g. execution time of a function -- no defer !) .
  • Know how to use time.Add and time.Sub
  • Know about time units and maybe do some calculations

Out of scope

  • Measuring time should to include defer
  • Sleep, After, ticker etc.

Concepts

  • time-duration

Prerequisites

  • time

Resources to refer to

Story Idea

There is already a possible story including tasks in the story list: https://exercism.org/docs/building/tracks/stories/datetimes-time-keeper This might be helpful as a template.

Help

If you have any questions while implementing the exercise, please post the questions as comments in this issue.