can't you use the Unit class ?
There is some conversion utilities but yes the class is private so you would need to tweak the library yourself.
There is some conversion utilities but yes the class is private so you would need to tweak the library yourself.