[44] Results

Golang : Timeout example

golang time-sleep time-out time-after delay

It is important for programs to know when to abort when connecting to external resources. One such example is the….... read more


Golang : Time slice or date sort and reverse sort example

golang sort-time time-slice reverse-sort

Sorting time.Time type and dates is pretty straight forward in Golang. Just curious why it is not included in the….... read more


Golang : Comparing date or timestamp

golang time-equal timestamp compare-time

Problem :

You have to compare two timestamps to see if the they are equal or not.

Solution :

Use….... read more


Python : Delay with time.sleep() function example

python delay time sleep

It has been a while since I look at Python code. Need to read up a legacy code left by….... read more


Golang : Measure execution time for a function

golang measure-function-time execution-time footer

Ok, this is another way to measure execution time of a Golang function. This method uses defer and produce a….... read more


Golang : Convert seconds to minutes and remainder seconds

golang seconds minutes time

Problem:

You have an input seconds in integer that you want to convert into minutes and remainder seconds. How to….... read more


Golang : calculate elapsed run time

golang elapsed-run-time

Calculating elapsed time can be useful for profiling or bench marking purpose. In this short tutorial, we will learn how….... read more


Golang : Get current time

golang get-current-time

Problem : Need to get current time stamp in Go and display in string. Solution : Use the time.Local() and time.Format() functions. getcurrenttime.go package main….... read more


Advertisement