mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
use kernel utility int2str and float2str
This commit is contained in:
parent
6efd2dd27e
commit
9ead08725d
14 changed files with 104 additions and 75 deletions
|
@ -204,8 +204,7 @@ string srs_path_build_timestamp(string template_path)
|
|||
// [timestamp],replace this const to current UNIX timestamp in ms.
|
||||
if (true) {
|
||||
int64_t now_us = ((int64_t)tv.tv_sec) * 1000 * 1000 + (int64_t)tv.tv_usec;
|
||||
snprintf(buf, sizeof(buf), "%"PRId64, now_us / 1000);
|
||||
path = srs_string_replace(path, "[timestamp]", buf);
|
||||
path = srs_string_replace(path, "[timestamp]", srs_int2str(now_us / 1000));
|
||||
}
|
||||
|
||||
return path;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue