\doxysection{Timer.\+h} \hypertarget{_timer_8h_source}{}\label{_timer_8h_source}\index{Include/Utility/Timer.h@{Include/Utility/Timer.h}} \begin{DoxyCode}{0} \DoxyCodeLine{00001\ \textcolor{comment}{//\ =====================================================================================================================}} \DoxyCodeLine{00002\ \textcolor{comment}{//\ Copyright\ 2024\ Medusa\ Slockbower}} \DoxyCodeLine{00003\ \textcolor{comment}{//\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ "{}License"{});}} \DoxyCodeLine{00004\ \textcolor{comment}{//\ you\ may\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}} \DoxyCodeLine{00005\ \textcolor{comment}{//\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}} \DoxyCodeLine{00006\ \textcolor{comment}{//}} \DoxyCodeLine{00007\ \textcolor{comment}{//\ \ http://www.apache.org/licenses/LICENSE-\/2.0}} \DoxyCodeLine{00008\ \textcolor{comment}{//}} \DoxyCodeLine{00009\ \textcolor{comment}{//\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}} \DoxyCodeLine{00010\ \textcolor{comment}{//\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ "{}AS\ IS"{}\ BASIS,}} \DoxyCodeLine{00011\ \textcolor{comment}{//\ WITHOUT\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}} \DoxyCodeLine{00012\ \textcolor{comment}{//\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}} \DoxyCodeLine{00013\ \textcolor{comment}{//\ limitations\ under\ the\ License.}} \DoxyCodeLine{00014\ \textcolor{comment}{//\ =====================================================================================================================}} \DoxyCodeLine{00015\ } \DoxyCodeLine{00016\ \textcolor{preprocessor}{\#ifndef\ TIMER\_H}} \DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ TIMER\_H}} \DoxyCodeLine{00018\ } \DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ }} \DoxyCodeLine{00020\ } \DoxyCodeLine{00021\ \textcolor{keyword}{namespace\ }OpenShaderDesigner} \DoxyCodeLine{00022\ \{} \DoxyCodeLine{00023\ \ \ \ \ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_open_shader_designer_1_1_timer}{Timer}}} \DoxyCodeLine{00024\ \ \ \ \ \{} \DoxyCodeLine{00025\ \ \ \ \ \textcolor{keyword}{public}:} \DoxyCodeLine{00026\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{class_open_shader_designer_1_1_timer}{Timer}}()\ :\ Start(std::chrono::high\_resolution\_clock::now())\ \{\ \}} \DoxyCodeLine{00027\ } \DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ Reset()\ \{\ Start\ =\ std::chrono::high\_resolution\_clock::now();\ \}} \DoxyCodeLine{00029\ } \DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ [[nodiscard]]\ \textcolor{keywordtype}{double}\ Poll()\textcolor{keyword}{\ const}} \DoxyCodeLine{00031\ \textcolor{keyword}{\ \ \ \ \ \ \ \ }\{\ \textcolor{keywordflow}{return}\ std::chrono::duration(std::chrono::high\_resolution\_clock::now()\ -\/\ Start).count();\ \}} \DoxyCodeLine{00032\ \ \ \ \ \textcolor{keyword}{private}:} \DoxyCodeLine{00033\ \ \ \ \ \ \ \ \ std::chrono::high\_resolution\_clock::time\_point\ Start;} \DoxyCodeLine{00034\ \ \ \ \ \};} \DoxyCodeLine{00035\ \}} \DoxyCodeLine{00036\ } \DoxyCodeLine{00037\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//TIMER\_H}} \end{DoxyCode}