Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   FMB, Mission & Campaign builder Discussions (http://forum.fulqrumpublishing.com/forumdisplay.php?f=203)
-   -   Stopwatch - missing using directive? (http://forum.fulqrumpublishing.com/showthread.php?t=34114)

salmo 08-29-2012 09:00 AM

Stopwatch - missing using directive?
 
All of a sudden I have a problem with the Stopwatch class. It throws a missing using directive error. I know that this class in held in System.Diagnostics, but when I open that directive the stopwatch is not there.

Code:

using System;
using maddox.game;
using maddox.game.world;
using System.Runtime.InteropServices;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using maddox.GP;
using System.Threading;
using System.Diagnostics;

public class Mission : AMission
{
    Stopwatch timer = new System.Diagnostics.Stopwatch();  // missing using directive
    Stopwatch timer = new Stopwatch();  // missing using directive
}

Any ideas what's going on? I've used stopwatch many times before without any problems.

salmo 08-30-2012 05:24 AM

[SOLVED] - Repaired the .NET client installed on my machine, must have got corrupted somehow.

Smokeynz 08-30-2012 10:20 PM

I stopped using stop watch timers, ok when doing 2 or 3 timers, but found if you have more it is difficult to keep track of stuff.
I also had a number of occasions where the timer would fail, unknown reason(broken spring maybe)

They appear to be range limited aswell.

I much prefer the tick counter as it appears to be the base of the engine time management

Time.tickCounter()


All times are GMT. The time now is 03:18 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.