mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Add seconds
This commit is contained in:
parent
3616ae1c1f
commit
b6d2a9b90a
1 changed files with 5 additions and 1 deletions
|
@ -8,7 +8,11 @@ use crate::scheduler::timespan::Timespan;
|
|||
use crate::scheduler::timespan::TimespanUnit;
|
||||
|
||||
pub fn studied_today(cards: u32, secs: f32, tr: &I18n) -> String {
|
||||
let span = Timespan::from_secs(secs).to_unit(TimespanUnit::Minutes);
|
||||
let span = Timespan::from_secs(secs).to_unit(if secs < 60 {
|
||||
TimespanUnit::Seconds
|
||||
} else {
|
||||
TimespanUnit::Minutes
|
||||
});
|
||||
let amount = span.as_unit();
|
||||
let unit = span.unit().as_str();
|
||||
let secs_per_card = if cards > 0 {
|
||||
|
|
Loading…
Reference in a new issue