Trinity-SpaceData / conjunction /nasa_cara /DistributedMatlab /Utils /LoggingAndStringReporting /current_timestring.m
Download conjunction/nasa_cara/DistributedMatlab/Utils/LoggingAndStringReporting/current_timestring.m from STAR-future/Trinity-SpaceData: direct link, hf CLI and curl.
- Browser
- Download file 535 Bytes
-
https://huggingface.co/datasets/STAR-future/Trinity-SpaceData/resolve/main/conjunction/nasa_cara/DistributedMatlab/Utils/LoggingAndStringReporting/current_timestring.m
- Command line
-
hf download hf://datasets/STAR-future/Trinity-SpaceData/conjunction/nasa_cara/DistributedMatlab/Utils/LoggingAndStringReporting/current_timestring.m
-
curl -L -o current_timestring.m https://huggingface.co/datasets/STAR-future/Trinity-SpaceData/resolve/main/conjunction/nasa_cara/DistributedMatlab/Utils/LoggingAndStringReporting/current_timestring.m
535 Bytes
| function [ts] = current_timestring(delimiter) | |
| % Generate the current time string | |
| if (~exist('delimiter','var')) | |
| delimiter = ''; | |
| end | |
| if (numel(delimiter) == 0) | |
| d1 = '-'; | |
| d2 = ' '; | |
| d3 = ':'; | |
| else | |
| d1 = delimiter; | |
| d2 = delimiter; | |
| d3 = delimiter; | |
| end | |
| cl = fix(clock); | |
| ts = [num2str(cl(1),'%04d') d1 ... | |
| num2str(cl(2),'%02d') d1 ... | |
| num2str(cl(3),'%02d') d2 ... | |
| num2str(cl(4),'%02d') d3 ... | |
| num2str(cl(5),'%02d') d3 ... | |
| num2str(cl(6),'%02d')]; | |
| return |