1 /*
2  * sys-emu - A system emulator for tutorials
3  * Copyright (C) 2018 - 2019 osdevelopment-info
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
17  */
18 package info.osdevelopment.sysemu.support
19 
20 object Utilities {
21 
22   implicit class BinaryUnitLong(val self: Long) extends AnyVal {
23 
24     def Ki: Long = self * 1024L
25 
26     def Mi: Long = self * 1024L * 1024L
27 
28     def Gi: Long = self * 1024L * 1024L * 1024L
29 
30     def Ti: Long = self * 1024L * 1024L * 1024L * 1024L
31 
32     def Pi: Long = self * 1024L * 1024L * 1024L * 1024L * 1024L
33 
34     def Ei: Long = self * 1024L * 1024L * 1024L * 1024L * 1024L * 1024L
35 
36   }
37 
38 }
Line Stmt Id Pos Tree Symbol Code
24 708 919 - 931 Apply scala.Long.* BinaryUnitLong.this.self.*(1024L)
26 709 952 - 972 Apply scala.Long.* BinaryUnitLong.this.self.*(1024L).*(1024L)
28 710 993 - 1021 Apply scala.Long.* BinaryUnitLong.this.self.*(1024L).*(1024L).*(1024L)
30 711 1042 - 1078 Apply scala.Long.* BinaryUnitLong.this.self.*(1024L).*(1024L).*(1024L).*(1024L)
32 712 1099 - 1143 Apply scala.Long.* BinaryUnitLong.this.self.*(1024L).*(1024L).*(1024L).*(1024L).*(1024L)
34 713 1164 - 1216 Apply scala.Long.* BinaryUnitLong.this.self.*(1024L).*(1024L).*(1024L).*(1024L).*(1024L).*(1024L)