exercism / exercism/go

Implement new Concept Exercise: time-duration

Open
#1,391 8 comments 0 reactions 0 assignees View on GitHub
x:action/create x:knowledge/intermediate x:module/concept-exercise x:size/large x:status/claimed x:type/content
Dominant language
Go
Stars
1.2k
Forks
686
Avg merge
54m
Merged PRs (30d)
1

Description

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

## Getting started

The docs can be found here
- [What are Concept Exercises?](https://exercism.org/docs/building/product/concept-exercises)
- [Concept Exercises](https://exercism.org/docs/building/tracks/concept-exercises)
- [Concepts](https://exercism.org/docs/building/tracks/concepts)

## 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

- [Time package](https://golang.org/pkg/time/)

## 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.