Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 16 lines (12 sloc) 0.364 kb
23bdd44 @colomon Start to sketch in ABC::Duration.
authored
1 use v6;
2
3 role ABC::Duration {
4 has $.ticks;
5
6 our sub duration-from-parse($top, $bottom) is export {
7 if +$top == 0 && +$bottom == 0 {
8 ABC::Duration.new(:ticks(1/2));
9 } else {
10 ABC::Duration.new(:ticks(($top.Int || 1) / ($bottom.Int || 1)));
11 }
12 }
13
14 # MUST: function to convert Duration to string
15 }
Something went wrong with that request. Please try again.