ErythroGuild / irene

<Erythro>'s server admin bot.
Mozilla Public License 2.0
0 stars 0 forks source link

Create `TimeLogger` library that implements `IDisposable` #294

Open Ernest314 opened 2 years ago

Ernest314 commented 2 years ago

Ideally, this can just be wrapped around any block of statements (using using) and on construction/destruction it will automatically log how much time the block took.

Only one parameter needs to be passed, some kind of naming string: e.g. "loading data", which will get automatically transformed into "Started loading data..." and "Finished loading data: ### msec".