summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authornavewindre <nw@moneybot.cc>2024-07-16 07:19:43 +0200
committernavewindre <nw@moneybot.cc>2024-07-16 07:19:43 +0200
commit4c8b52fc94c04c4b3d338c2501971ae348f5b3e5 (patch)
tree049ff320ffed7398b91887f6c39cfa3f715a1ee4 /src/util.h
parent320e7b14a5a29838ed2cb909cadfd7c448c6849b (diff)
やーーーー
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 705a778..1277047 100644
--- a/src/util.h
+++ b/src/util.h
@@ -181,4 +181,10 @@ inline U64 u_tick() {
inline F64 u_time() {
constexpr F64 NSEC_TO_SEC = 1.f / T_SEC;
return u_tick() * NSEC_TO_SEC;
+}
+
+inline void u_write_to_file( const char* str, const char* file ) {
+ FILE* f = fopen( file, "w" );
+ fwrite( str, 1, strlen( str ), f );
+ fclose( f );
} \ No newline at end of file