@@ -125,6 +125,17 @@ static void printDisk(FFDiskOptions* options, const FFDisk* disk, uint32_t index
125125 bool isHidden = !!(disk -> type & FF_DISK_VOLUME_TYPE_HIDDEN_BIT );
126126 bool isReadOnly = !!(disk -> type & FF_DISK_VOLUME_TYPE_READONLY_BIT );
127127
128+ uint64_t duration = ffTimeGetNow () - disk -> createTime ;
129+ uint32_t milliseconds = (uint32_t ) (duration % 1000 );
130+ duration /= 1000 ;
131+ uint32_t seconds = (uint32_t ) (duration % 60 );
132+ duration /= 60 ;
133+ uint32_t minutes = (uint32_t ) (duration % 60 );
134+ duration /= 60 ;
135+ uint32_t hours = (uint32_t ) (duration % 24 );
136+ duration /= 24 ;
137+ uint32_t days = (uint32_t ) duration ;
138+
128139 FF_PRINT_FORMAT_CHECKED (key .chars , 0 , & options -> moduleArgs , FF_PRINT_TYPE_NO_CUSTOM_KEY , ((FFformatarg []) {
129140 FF_FORMAT_ARG (usedPretty , "size-used" ),
130141 FF_FORMAT_ARG (totalPretty , "size-total" ),
@@ -140,6 +151,11 @@ static void printDisk(FFDiskOptions* options, const FFDisk* disk, uint32_t index
140151 {FF_FORMAT_ARG_TYPE_STRING , ffTimeToShortStr (disk -> createTime ), "create-time" },
141152 FF_FORMAT_ARG (bytesPercentageBar , "size-percentage-bar" ),
142153 FF_FORMAT_ARG (filesPercentageBar , "files-percentage-bar" ),
154+ FF_FORMAT_ARG (days , "days" ),
155+ FF_FORMAT_ARG (hours , "hours" ),
156+ FF_FORMAT_ARG (minutes , "minutes" ),
157+ FF_FORMAT_ARG (seconds , "seconds" ),
158+ FF_FORMAT_ARG (milliseconds , "milliseconds" ),
143159 }));
144160 }
145161}
@@ -462,7 +478,11 @@ static FFModuleBaseInfo ffModuleInfo = {
462478 {"Create time in local timezone" , "create-time" },
463479 {"Size percentage bar" , "size-percentage-bar" },
464480 {"Files percentage bar" , "files-percentage-bar" },
465- {},
481+ {"Days after creation" , "days" },
482+ {"Hours after creation" , "hours" },
483+ {"Minutes after creation" , "minutes" },
484+ {"Seconds after creation" , "seconds" },
485+ {"Milliseconds after creation" , "milliseconds" },
466486 }))
467487};
468488
0 commit comments