Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/squirrelsh
- class TestClass
- {
- constructor(interger)
- {
- testint = interger;
- }
- testint = 0;
- }
- function TestClass::Change(integer)
- {
- testint = integer;
- }
- function TestClass::DoPrint()
- {
- print(testint.tostring() + " is the number!\n");
- }
- local tc = TestClass(5);
- tc.DoPrint();
- tc.Change(10);
- tc.DoPrint();
- print("Speed Test\n");
- local start = localtime();
- local loops = 10000000;
- for(local i = 0.0; i < loops; i++)
- sqrt(i);
- local total = localtime() - start;
- print(loops.tostring() + " sqrt function calls, starting at 0 ending at " + loops.tostring() + " in " + total.tostring() + " seconds\n");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement