MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / ofGetTimestampString

Function ofGetTimestampString

Source/OpenFrameworksPort.cpp:551–569  ·  view source on GitHub ↗

%Y-%m-%d-%H-%M-%S-%i

Source from the content-addressed store, hash-verified

549
550//%Y-%m-%d-%H-%M-%S-%i
551std::string ofGetTimestampString(std::string in)
552{
553 Time time = Time::getCurrentTime();
554 ofStringReplace(in, "%Y", ofToString(time.getYear()));
555 char buff[16];
556 snprintf(buff, sizeof(buff), "%02d", time.getMonth() + 1);
557 ofStringReplace(in, "%m", buff);
558 snprintf(buff, sizeof(buff), "%02d", time.getDayOfMonth());
559 ofStringReplace(in, "%d", buff);
560 snprintf(buff, sizeof(buff), "%02d", time.getHours());
561 ofStringReplace(in, "%H", buff);
562 snprintf(buff, sizeof(buff), "%02d", time.getMinutes());
563 ofStringReplace(in, "%M", buff);
564 snprintf(buff, sizeof(buff), "%02d", time.getSeconds());
565 ofStringReplace(in, "%S", buff);
566 snprintf(buff, sizeof(buff), "%03d", time.getMilliseconds());
567 ofStringReplace(in, "%i", buff);
568 return in;
569}
570
571void ofTriangle(float x1, float y1, float x2, float y2, float x3, float y3)
572{

Callers 10

ButtonClickedMethod · 0.85
DoWriteMethod · 0.85
ButtonClickedMethod · 0.85
DoWriteMethod · 0.85
ButtonClickedMethod · 0.85
DumpStatsMethod · 0.85
SaveStatePopupMethod · 0.85
DoAutosaveMethod · 0.85
SaveOutputMethod · 0.85
DoWriteMethod · 0.85

Calls 2

ofStringReplaceFunction · 0.85
ofToStringFunction · 0.85

Tested by

no test coverage detected