code: public Duration getWorkVariance()
     {
        Duration variance = (Duration) getCachedValue(ResourceField.WORK_VARIANCE);
        if (variance == null)
        {
           Duration work = getWork();
           Duration baselineWork = getBaselineWork();
           if (work != null && baselineWork != null)
           {
              variance = Duration.getInstance(work.getDuration() - baselineWork.convertUnits(work.getUnits(), getParentFile().getProjectProperties()).getDuration(), work.getUnits());
              set(ResourceField.WORK_VARIANCE, variance);
           }
        }
        return (variance);
     }
docs: Retrieves the work variance.
  
  @return work variance