private static void SinWave2(object dummy = null) { //CAPI.SetProcessAffinityMask(CAPI.GetCurrentThread(), new UIntPtr(0x00000001)); ///0x08 第4核 4 第三核 2第二核 1第1核 CAPI.SetThreadAffinityMask(CAPI.GetCurrentThread(), new IntPtr(0x08)); while (true) { for (double i = 0.0; i < 2 * Math.PI; i += 0.1) { Compute(500, Math.Sin(i) / 2.0 + 0.5); } } }