Dynamic Neural Field Composer 0.0.0
A C++20 library and interactive application for building and simulating Dynamic Neural Field (DNF) architectures.
Loading...
Searching...
No Matches
profiling.h
Go to the documentation of this file.
1#pragma once
2
3#include <chrono>
4#include <string>
5#include <iostream>
6#include <mutex>
7
8
9
11{
12 // to use the timer class:
13 // void your_function()
14 // {
15 // {
16 // timer t;
17 // const int a = 1 + 5;
18 // std::cout << "My integer is: " << a << std::endl;
19 // }
20 // }
21
22 class Timer
23 {
24 public:
25 Timer(std::string signature = "something that takes time", std::ostream& outStream = std::cout);
26 ~Timer();
27 private:
28 void stop() const;
29 private:
30 std::chrono::time_point<std::chrono::high_resolution_clock> startTimepoint;
31 std::string signature;
32 std::ostream& outStream;
33 };
34}
35
36
37
Definition profiling.h:23
~Timer()
Definition profiling.cpp:16
Definition profiling.h:11