This commit is contained in:
commit
568474d52f
1591 files changed
+528213
No files matched your search
Generated
+18
@@ -0,0 +1,18 @@
|
||||
struct FrameCounter(Copyable):
|
||||
var count: Int
|
||||
|
||||
def __init__(out self, count: Int):
|
||||
self.count = count
|
||||
|
||||
def increment(self):
|
||||
self.count += 1
|
||||
|
||||
def get(self) -> Int:
|
||||
return self.count
|
||||
|
||||
|
||||
def main():
|
||||
var counter = FrameCounter(0)
|
||||
counter.increment()
|
||||
counter.increment()
|
||||
print("Frames handled:", counter.get())
|
||||
Reference in new issue
Block a user