I have this header file:
Utility.h:
#pragma once
#include
#include
#include
#includ
There are main two problems:
You have placed intended header code in a ".cpp" file, which your IDE by default will treat as a main source code file (translation unit).
You are including non-inline function definitions (the class member functions) in the global namespace in a header. When that header is included in two or more translation units you will get a One Definition Rule (ODR) violation. In practice the linker will complain.
To fix this:
Change the filename extension from ".cpp" to e.g. ".hpp" or just plain ".h". It is code intended for header file use. The filename extension should reflect that, instead of misleading.
Declare the functions inline, or place definitions within the class definition.
In other news, possibly one of the clocks, from the standard library, will serve your purpose so that you don't have to include in a header. It does drag in a zillion unreasonable macros. Including, by default, lowercase min and max macros, so this code is very ungood as given.