Output changing electrical currents from a PC
Use a microcontroller to control a current source or sink, and have that communicate to the PC.  UART communication will be easiest at the micro.  If your PC doesn't have a serial port, you can use a USB to serial adapter.  This doesn't sound like a product, so that is probably good enough.

The micro can easily respond to commands from the PC and change the output of a current sink or source in well under a second.  That is actually quite a lon time.