Simple ConsoleWorker This class updates the console's title so it can tell the person using it the programs uptime, which can be pretty useful. The class holds a timer and each time the timer executes it will call the function to update the title (interval is in config file).

How can I improve on this?

using Apple.Application.Base.Config;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Timers;

namespace Apple.Application.Base.Core
{
    class ConsoleWorker
    {
        /// &lt;summary&gt;
        /// Console timer
        /// &lt;/summary&gt;
        private Timer _consoleTimer;

        /// &lt;summary&gt;
        /// ConsoleWorker
        /// &lt;/summary&gt;
        /// &lt;param name="config"&gt;Instance of AppleConfig&lt;/param&gt;
        public ConsoleWorker(AppleConfig config)
        {
            _consoleTimer = new Timer(int.Parse(config.GetConfigElement("console.timer.interval")));
            _consoleTimer.Elapsed += new ElapsedEventHandler(OnElapsed);
            _consoleTimer.Enabled = true; // Enable it
        }

        public void OnElapsed(object sender, ElapsedEventArgs e)
        {
            DateTime Startup = Apple.ServerInformation.ServerStarted;
            TimeSpan Uptime = DateTime.Now - Startup;

            string days = Uptime.Days + " day" + (Uptime.Days != 1 ? "s" : "") + ", ";
            string hours = Uptime.Hours + " hour" + (Uptime.Hours != 1 ? "s" : "") + ", and ";
            string mins = Uptime.Minutes + " min" + (Uptime.Minutes != 1 ? "s" : "");
            string UptimeString = days + hours + mins;

            Console.Title = "Apple Server [" + UptimeString + "]";
        }
    }
}
I think for the given task, the code is fine. 

If you want to do some architecting, here are some thoughts


I'd say the class does two things, timing and updating console
I'd create a worker class that would do the timer stuff
Inject (using dependency injection) an interface that can output stuff
Create an interface that defines "outputting stuff"
Create a console version of that interface
Feed it to the concrete one


It's just refactoring so that you can use the same stuff to write output to different places such as disk, web service etc..