tracy/server/TracyPrint.hpp

22 lines
415 B
C++
Raw Normal View History

2019-06-18 18:43:28 +00:00
#ifndef __TRACYPRINT_HPP__
#define __TRACYPRINT_HPP__
2020-01-31 00:19:08 +00:00
#include <stdio.h>
2019-06-18 18:43:28 +00:00
namespace tracy
{
2020-01-31 00:19:08 +00:00
template<typename T>
static inline char* PrintFloat( char* begin, char* end, T value, int precision )
{
return begin + sprintf( begin, "%.*f", precision, value );
}
2019-06-18 18:43:28 +00:00
const char* TimeToString( int64_t ns );
const char* RealToString( double val, bool separator );
const char* MemSizeToString( int64_t val );
}
#endif