Finding period of a square wave with varying sampling frequency
Pick a nice center value, say 1.0, scan across looking for crossings from down to up (or the reverse).  Mark the spot of your first crossing, count up some fixed number of crossings, call the count N.  Take your system timer value at your first crossing and your last crossing.  Divide the time interval by N and you'll have a very good estimate of the period.  How uneven the crossings are in the interval is immaterial.  If you can assure the two crossing that you are timing happen in "the same state", you will lose one more level of uncertainty.

You can't do it much simpler than that.  Increased accuracy will come from interpolating the crossing point rather than taking the closest sample's time.

----------------------

Follow up

You'll have to figure the Interpolate routine out yourself.  It's not that hard.

The logic is very straightforward and significantly less computationly heavy than an auto-correlation technique.  More accurate in this case too.

Pseudo-code


    FirstIndex = -1
    N = 0

    For i = 0 to PointCount
      If signal[i] &lt;= 1.0 and signal[i+1] &gt; 1.0 Then
         If FirstIndex &lt; 0 Then
            T1A = System.Time(i)
            T1B = System.Time(i+1)
            FirstIndex = i
         Else        
            TNA = System.Time(i)
            TNB = System.Time(i+1)
            LastIndex = i
            N += 1
         End If
      End If
    Next

    T1 = Interpolate( T1A, T1B, Signal[FirstIndex], Signal[FirstIndex+1] )
    TN = Interpolate( TNA, TNB, Signal[LastIndex], Signal[LastIndex+1] )

    Period = ( TN - T1 ) / N


You may not need to interpolate, (TNA - T1A)/N may be accurate enough.