Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <dynamic>
- #include <profiler>
- Handle profiler;
- Dynamic objects[10000];
- public void OnPluginStart()
- {
- profiler = CreateProfiler();
- StartProfiling(profiler);
- // Initialize
- for(int i = 0; i < sizeof(objects); i++)
- {
- objects[i] = Dynamic();
- }
- // Write
- for(int i = 0; i < sizeof(objects); i++)
- {
- objects[i].SetInt("testint", i);
- }
- // Read
- int test;
- for(int i = 0; i < sizeof(objects); i++)
- {
- test = objects[i].GetInt("testint");
- }
- if (test){} // silence "symbol is assigned a value that is never used: "test""
- for(int i = 0; i < sizeof(objects); i++)
- {
- objects[i].Dispose();
- }
- StopProfiling(profiler);
- float time = GetProfilerTime(profiler);
- PrintToServer("Operation took %f seconds", time);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement