added duration method
Merge pull request #15 from sudotong/master

Fixed issue #4