public void HandleOrgasmData(object sender, OrgasmDataPointArgs args) { lock (_emitLock) { // On o****m run the output at max for 30 seconds _last = DateTimeOffset.Now.AddSeconds(30).ToUnixTimeMilliseconds(); OutputChange?.Invoke(this, new OutputChangeArgs(1)); } }
public void HandleNogasmData(object sender, NogasmDataPointArgs args) { lock (_emitLock) { var now = DateTimeOffset.Now.ToUnixTimeMilliseconds(); if (now - _last <= 10) { return; } _last = now; OutputChange?.Invoke(this, new OutputChangeArgs(args.MotorSpeed / 155)); } }
static extern int AudioObjectAddPropertyListener(uint inObjectID, ref AudioObjectPropertyAddress inAddress, OutputChange callback, IntPtr clientData);