Implement Time

This commit is contained in:
Matthias Beyer 2016-05-28 20:36:43 +02:00
parent 4ea0b98cc2
commit f2da7ce4a9

View file

@ -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
} }
} }