foobar2000 SDK  2015-08-03
Public Member Functions | Private Attributes
pfc::format_time_ex

#include <string_base.h>

Public Member Functions

 format_time_ex (double p_seconds, unsigned p_extra=3)
 
const char * get_ptr () const
 
 operator const char * () const
 

Private Attributes

string_fixed_t< 127 > m_buffer
 

Detailed Description

Definition at line 489 of file string_base.h.

Constructor & Destructor Documentation

pfc::format_time_ex::format_time_ex ( double  p_seconds,
unsigned  p_extra = 3 
)

Definition at line 883 of file string_base.cpp.

883  {
884  t_uint64 pow10 = pow10_helper(p_extra);
885  t_uint64 ticks = pfc::rint64(pow10 * p_seconds);
886 
887  m_buffer << pfc::format_time(ticks / pow10);
888  if (p_extra>0) {
889  m_buffer << "." << pfc::format_uint(ticks % pow10, p_extra);
890  }
891 }
uint64_t t_uint64
Definition: int_types.h:3
string_fixed_t< 127 > m_buffer
Definition: string_base.h:495
t_int64 rint64(double p_val)
Definition: other.cpp:210
static t_uint64 pow10_helper(unsigned p_extra)

Member Function Documentation

const char* pfc::format_time_ex::get_ptr ( ) const
inline

Definition at line 492 of file string_base.h.

492 {return m_buffer;}
string_fixed_t< 127 > m_buffer
Definition: string_base.h:495
pfc::format_time_ex::operator const char * ( ) const
inline

Definition at line 493 of file string_base.h.

493 {return m_buffer;}
string_fixed_t< 127 > m_buffer
Definition: string_base.h:495

Field Documentation

string_fixed_t<127> pfc::format_time_ex::m_buffer
private

Definition at line 495 of file string_base.h.


The documentation for this class was generated from the following files: