Implement Time
This commit is contained in:
parent
4ea0b98cc2
commit
f2da7ce4a9
1 changed files with 18 additions and 2 deletions
|
@ -10,8 +10,24 @@ pub struct Time {
|
||||||
|
|
||||||
impl Time {
|
impl Time {
|
||||||
|
|
||||||
fn new(hour: u32, minute: u32, second: u32) -> Time {
|
pub fn new(hour: u32, minute: u32, second: u32) -> Time {
|
||||||
unimplemented!()
|
Time {
|
||||||
|
hour: hour,
|
||||||
|
minute: minute,
|
||||||
|
second: second
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn hour(&self) -> u32 {
|
||||||
|
self.hour
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn minute(&self) -> u32 {
|
||||||
|
self.minute
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn second(&self) -> u32 {
|
||||||
|
self.second
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue